diff --git a/pkg/services/oss_service.go b/pkg/services/oss_service.go index 0298244..51350a9 100755 --- a/pkg/services/oss_service.go +++ b/pkg/services/oss_service.go @@ -207,9 +207,7 @@ func (s *s3OSS) PublicURL(objectKey string) string { func (s *s3OSS) UploadFile(objectKey, filePath string) error { ctx := context.Background() _, err := s.client.FPutObject(ctx, s.bucketName, objectKey, filePath, minio.PutObjectOptions{ - UserMetadata: map[string]string{ - "Content-Disposition": "attachment", - }, + ContentDisposition: "attachment", }) if err != nil { return fmt.Errorf("error subiendo archivo a S3: %w", err) @@ -285,9 +283,7 @@ func (s *s3OSS) SignedURL(objectKey string, expireSeconds int) (string, error) { func (s *s3OSS) UploadFromReader(objectKey, contentType string, r io.Reader) error { ctx := context.Background() opts := minio.PutObjectOptions{ - UserMetadata: map[string]string{ - "Content-Disposition": "attachment", - }, + ContentDisposition: "attachment", } if contentType != "" { opts.ContentType = contentType