Skip to content

Commit

Permalink
handle put object err
Browse files Browse the repository at this point in the history
  • Loading branch information
maruware committed Mar 22, 2019
1 parent cd8a5be commit 6f1d5b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,16 @@ func syncObject(svc *s3.S3, bucket *string, filePath string, contentType string,
return false, err
}

svc.PutObject(&s3.PutObjectInput{
_, err = svc.PutObject(&s3.PutObjectInput{
Bucket: bucket,
Key: &key,
Body: f,
ContentType: &contentType,
ACL: aws.String("public-read"),
})
if err != nil {
return false, err
}

fmt.Println("[Put]", key)

Expand Down

0 comments on commit 6f1d5b1

Please sign in to comment.