fix upload blob to s3

This commit is contained in:
Evan Jarrett
2026-02-14 22:17:15 -06:00
parent 3085fc726b
commit f307d6ea85
+6 -4
View File
@@ -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
}