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