fix: dateTime usage only available in go1.20 (#2982)
instead use a simpler normalizer for timestamp to be user friendly without spaces. For example ``` selected_files_20091110T230000Z.zip ```
This commit is contained in:
@@ -741,7 +741,7 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
|
||||
defer resp.Close()
|
||||
|
||||
// indicate it's a download / inline content to the browser, and the size of the object
|
||||
fileName := "selected_files_" + time.Now().UTC().Format(time.DateTime)
|
||||
fileName := "selected_files_" + strings.ReplaceAll(strings.ReplaceAll(time.Now().UTC().Format(time.RFC3339), ":", ""), "-", "")
|
||||
|
||||
rw.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s.zip\"", fileName))
|
||||
rw.Header().Set("Content-Type", "application/zip")
|
||||
|
||||
Reference in New Issue
Block a user