Skip to content
Snippets Groups Projects
Commit 2536b35c authored by Jano Hendriks's avatar Jano Hendriks
Browse files

Add error check for S3 presign functions

parent 1940f14b
Branches
Tags v1.229.0
No related merge requests found
......@@ -326,6 +326,9 @@ func (s ClientWithHelpers) GetSignedDownloadURL(bucket string, fileName string,
getRequest, err := presignClient.PresignGetObject(context.TODO(), getInput, func(po *s3.PresignOptions) {
po.Expires = duration
})
if err != nil {
return "", err
}
return getRequest.URL, err
}
......@@ -341,6 +344,9 @@ func (s ClientWithHelpers) GetSignedUploadURL(bucket string, fileName string, du
putRequest, err := presignClient.PresignPutObject(context.TODO(), putInput, func(po *s3.PresignOptions) {
po.Expires = duration
})
if err != nil {
return "", err
}
return putRequest.URL, err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment