feat: add safe backup management and theme preferences

Add snapshot usage and protected cleanup, preserve unsaved profile edits, avoid holding SQL connections during snapshot deletion, and fix download filenames. Include regression tests and API documentation.
This commit is contained in:
2026-10-17 00:36:21 +08:00
parent 09e202796f
commit 602917698a
20 changed files with 1240 additions and 83 deletions
+1 -1
View File
@@ -781,7 +781,7 @@ func (a *API) wsDownload(w http.ResponseWriter, r *http.Request, root *os.Root)
fail(w, 400, "invalid file")
return
}
w.Header().Set("Content-Disposition", "attachment")
w.Header().Set("Content-Disposition", mime.FormatMediaType("attachment", map[string]string{"filename": path.Base(p)}))
http.ServeContent(w, r, path.Base(p), st.ModTime(), f)
}