Skip to content
Snippets Groups Projects
Commit 09b84c4a authored by Cornel Rautenbach's avatar Cornel Rautenbach
Browse files

Add should download to UploadWith1DayExpiry

parent 9fc0b76d
No related branches found
No related tags found
No related merge requests found
...@@ -135,7 +135,7 @@ func (s SessionWithHelpers) UploadWithSettings(data []byte, bucket, fileName str ...@@ -135,7 +135,7 @@ func (s SessionWithHelpers) UploadWithSettings(data []byte, bucket, fileName str
return "", nil return "", nil
} }
func (s SessionWithHelpers) UploadWith1DayExpiry(data []byte, bucket, fileName string, mimeType MIMEType) (string, error) { func (s SessionWithHelpers) UploadWith1DayExpiry(data []byte, bucket, fileName string, mimeType MIMEType, shouldDownloadInsteadOfOpen bool) (string, error) {
if mimeType == "" { if mimeType == "" {
mimeType = getTypeForFilename(fileName) mimeType = getTypeForFilename(fileName)
} }
...@@ -145,6 +145,7 @@ func (s SessionWithHelpers) UploadWith1DayExpiry(data []byte, bucket, fileName s ...@@ -145,6 +145,7 @@ func (s SessionWithHelpers) UploadWith1DayExpiry(data []byte, bucket, fileName s
MimeType: mimeType, MimeType: mimeType,
RetrieveSignedUrl: true, RetrieveSignedUrl: true,
ExpiryDuration: &expiry, ExpiryDuration: &expiry,
AddContentDisposition: shouldDownloadInsteadOfOpen,
}) })
if err != nil { if err != nil {
return "", err return "", err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment