From 0d96f4efac0fd86a9e8e276362b818a3a3d99f8c Mon Sep 17 00:00:00 2001 From: Azareal Date: Wed, 22 Aug 2018 16:37:36 +1000 Subject: [PATCH] Use the correct mimetype for SQL backups. --- routes/panel/backups.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routes/panel/backups.go b/routes/panel/backups.go index 28cf7db4..29a5c90c 100644 --- a/routes/panel/backups.go +++ b/routes/panel/backups.go @@ -29,6 +29,7 @@ func Backups(w http.ResponseWriter, r *http.Request, user common.User, backupURL // TODO: Change the served filename to gosora_backup_%timestamp%.sql, the time the file was generated, not when it was modified aka what the name of it should be w.Header().Set("Content-Disposition", "attachment; filename=gosora_backup.sql") w.Header().Set("Content-Length", strconv.FormatInt(info.Size(), 10)) + w.Header().Set("Content-Type", "application/sql") // TODO: Fix the problem where non-existent files aren't greeted with custom 404s on ServeFile()'s side http.ServeFile(w, r, "./backups/"+backupURL) return nil