mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
increase presigned URL expiration time from 5 to 10 seconds
This commit is contained in:
@@ -53,7 +53,7 @@ func (s *S3Storage) Download(storageKey string, fileName string) (string, error)
|
||||
}
|
||||
reqParams := make(url.Values)
|
||||
reqParams.Set("response-content-disposition", "attachment; filename=\""+fileName+"\"")
|
||||
presignedURL, err := minioClient.PresignedGetObject(context.Background(), s.BucketName, storageKey, 5*time.Second, reqParams)
|
||||
presignedURL, err := minioClient.PresignedGetObject(context.Background(), s.BucketName, storageKey, 10*time.Second, reqParams)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return "", errors.New("failed to generate presigned URL")
|
||||
|
Reference in New Issue
Block a user