Add content-disposition header to set a download name

This commit is contained in:
Deluan 2020-08-05 18:40:46 -04:00
parent 883dd7f728
commit 4ec451aecb

View File

@ -89,6 +89,7 @@ func (c *StreamController) Download(w http.ResponseWriter, r *http.Request) (*re
http.ServeContent(w, r, stream.Name(), stream.ModTime(), stream)
} else {
w.Header().Set("Content-Disposition", "attachment; filename=Navidrome-download.zip")
w.Header().Set("Content-Type", "application/zip")
err := c.archiver.Zip(r.Context(), id, w)