Added content type to S3 upload call

This commit is contained in:
Asaf Gartner 2021-10-25 02:30:28 +03:00
parent aab2205e62
commit 307699af4c
1 changed files with 5 additions and 4 deletions

View File

@ -89,10 +89,11 @@ func Create(ctx context.Context, dbConn db.ConnOrTx, in CreateInput) (*models.As
upload := func() error {
_, err := client.PutObject(ctx, &s3.PutObjectInput{
Bucket: &config.Config.DigitalOcean.AssetsSpacesBucket,
Key: &key,
Body: bytes.NewReader(in.Content),
ACL: types.ObjectCannedACLPublicRead,
Bucket: &config.Config.DigitalOcean.AssetsSpacesBucket,
Key: &key,
Body: bytes.NewReader(in.Content),
ACL: types.ObjectCannedACLPublicRead,
ContentType: &in.ContentType,
})
return err
}