Skip to content

🎧 Your Personal Streaming Service

Add content-disposition header to set a download name

Deluan4ec451aecb3c
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)