Added content type to S3 upload call
This commit is contained in:
parent
aab2205e62
commit
307699af4c
|
@ -89,10 +89,11 @@ func Create(ctx context.Context, dbConn db.ConnOrTx, in CreateInput) (*models.As
|
||||||
|
|
||||||
upload := func() error {
|
upload := func() error {
|
||||||
_, err := client.PutObject(ctx, &s3.PutObjectInput{
|
_, err := client.PutObject(ctx, &s3.PutObjectInput{
|
||||||
Bucket: &config.Config.DigitalOcean.AssetsSpacesBucket,
|
Bucket: &config.Config.DigitalOcean.AssetsSpacesBucket,
|
||||||
Key: &key,
|
Key: &key,
|
||||||
Body: bytes.NewReader(in.Content),
|
Body: bytes.NewReader(in.Content),
|
||||||
ACL: types.ObjectCannedACLPublicRead,
|
ACL: types.ObjectCannedACLPublicRead,
|
||||||
|
ContentType: &in.ContentType,
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue