Add content type to presigned URL

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-05 15:31:18 +04:00
parent e094dc847b
commit 7c879eae43

View File

@@ -146,6 +146,7 @@ func (s *Service) GenerateFileUrl(
Bucket: aws.String(file.GetBucketName()), Bucket: aws.String(file.GetBucketName()),
Key: aws.String(file.GetObjectKey()), Key: aws.String(file.GetObjectKey()),
ResponseCacheControl: aws.String("max-age=3600, public"), ResponseCacheControl: aws.String("max-age=3600, public"),
ResponseContentType: aws.String(file.GetMimeType()),
ResponseContentDisposition: &contentDisposition, ResponseContentDisposition: &contentDisposition,
}, },
func(opts *s3.PresignOptions) { func(opts *s3.PresignOptions) {