mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
download as zip: improve filename
include username and also filename/directory name if the user downloads a single file/directory Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -653,7 +653,8 @@ func (s *httpdServer) handleWebClientDownloadZip(w http.ResponseWriter, r *http.
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Disposition", "attachment; filename=\"sftpgo-download.zip\"")
|
||||
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"",
|
||||
getCompressedFileName(connection.GetUsername(), filesList)))
|
||||
renderCompressedFiles(w, connection, name, filesList, nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user