From fa0991eed73c4a05b2c9d794c90f8bf72df61052 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 11 Jun 2026 17:47:46 -0500 Subject: [PATCH] Update oss_service.go --- pkg/services/oss_service.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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