From f7712951499ee0a818b28fb2209ece72781b62e0 Mon Sep 17 00:00:00 2001 From: Nathan LaFreniere Date: Thu, 31 Dec 2015 12:52:34 -0800 Subject: [PATCH] add missing else clause --- aws.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/aws.go b/aws.go index f8b5b68..e28e4bd 100644 --- a/aws.go +++ b/aws.go @@ -199,9 +199,18 @@ func (a *AWS) Upload(local, remote string) error { MetadataDirective: aws.String("REPLACE"), }) 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 {