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 }