Skip to content

Commit fed5aa1

Browse files
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 ```
1 parent 6bc4efb commit fed5aa1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/cross-compile.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
strategy:
2828
matrix:
29-
go-version: [ 1.20.x ]
29+
go-version: [ 1.19.x, 1.20.x ]
3030
os: [ ubuntu-latest ]
3131
steps:
3232
- name: Check out code

restapi/user_objects.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
741741
defer resp.Close()
742742

743743
// indicate it's a download / inline content to the browser, and the size of the object
744-
fileName := "selected_files_" + time.Now().UTC().Format(time.DateTime)
744+
fileName := "selected_files_" + strings.ReplaceAll(strings.ReplaceAll(time.Now().UTC().Format(time.RFC3339), ":", ""), "-", "")
745745

746746
rw.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s.zip\"", fileName))
747747
rw.Header().Set("Content-Type", "application/zip")

0 commit comments

Comments
 (0)