0
0
mirror of https://github.com/thegeeklab/wp-s3-action.git synced 2024-11-10 04:40:38 +00:00

add missing else clause

This commit is contained in:
Nathan LaFreniere 2015-12-31 12:52:34 -08:00
parent 2cc61b680a
commit f771295149

13
aws.go
View File

@ -199,9 +199,18 @@ func (a *AWS) Upload(local, remote string) error {
MetadataDirective: aws.String("REPLACE"), MetadataDirective: aws.String("REPLACE"),
}) })
return err return err
} else {
debug("Uploading \"%s\" with Content-Type \"%s\" and permissions \"%s\"", local, contentType, access)
_, err = a.client.PutObject(&s3.PutObjectInput{
Bucket: aws.String(a.vargs.Bucket),
Key: aws.String(remote),
Body: file,
ContentType: aws.String(contentType),
ACL: aws.String(access),
Metadata: metadata,
})
return err
} }
return nil
} }
func (a *AWS) Redirect(path, location string) error { func (a *AWS) Redirect(path, location string) error {