Compare commits

...

1 Commits

Author SHA1 Message Date
Harshavardhana
fed5aa1599 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
```
2023-08-03 20:21:44 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.20.x ]
go-version: [ 1.19.x, 1.20.x ]
os: [ ubuntu-latest ]
steps:
- name: Check out code

View File

@@ -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")