From 4ec451aecb3cc18f3b78c40e4195b80259adfb53 Mon Sep 17 00:00:00 2001 From: Deluan Date: Wed, 5 Aug 2020 18:40:46 -0400 Subject: [PATCH] Add content-disposition header to set a download name --- server/subsonic/stream.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/subsonic/stream.go b/server/subsonic/stream.go index 9afc3c334..c29d27a32 100644 --- a/server/subsonic/stream.go +++ b/server/subsonic/stream.go @@ -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)