From f307d6ea8540ae646c5aa4c92f0338852fee65bf Mon Sep 17 00:00:00 2001 From: Evan Jarrett Date: Sat, 14 Feb 2026 22:17:15 -0600 Subject: [PATCH] fix upload blob to s3 --- pkg/s3/types.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/s3/types.go b/pkg/s3/types.go index 06069f5..20f0c5b 100644 --- a/pkg/s3/types.go +++ b/pkg/s3/types.go @@ -248,11 +248,13 @@ func (s *S3Service) Stat(ctx context.Context, blobPath string) (int64, error) { // PutBytes uploads data to blobPath with the given content type. func (s *S3Service) PutBytes(ctx context.Context, blobPath string, data []byte, contentType string) error { key := s.s3Key(blobPath) + contentLength := int64(len(data)) _, err := s.Client.PutObject(ctx, &awss3.PutObjectInput{ - Bucket: &s.Bucket, - Key: &key, - Body: bytes.NewReader(data), - ContentType: &contentType, + Bucket: &s.Bucket, + Key: &key, + Body: bytes.NewReader(data), + ContentType: &contentType, + ContentLength: &contentLength, }) return err }