leemunroe / grunt-email-workflow

A Grunt workflow for designing and testing responsive HTML email templates with SCSS.
MIT License
3.05k stars 339 forks source link

s3upload uploads to wrong folder #98

Closed Lieneke closed 4 years ago

Lieneke commented 6 years ago

when using s3upload, the images are uploaded to bucket/dist/img/image.png but the html is changed to bucket/img/image.png.

taeo commented 6 years ago

@Lieneke - What does your secrets.json look like for s3 "bucketdir" and "bucketuri"? (Be sure not to post any secret keys) :)

  "s3": {
    "bucketdir": "AMAZON S3 BUCKET SUBDIRECTORY (optional)",
    "bucketuri": "AMAZON S3 PATH (ex: https://s3.amazonaws.com/)"
  }
taeo commented 6 years ago

Noting this relates to #74

Lieneke commented 6 years ago
   "bucketdir": "lexlumen",
   "bucketuri": "https://s3.eu-west-2.amazonaws.com/"
taeo commented 5 years ago

With the default command cdn:aws_s3 and these settings in secrets.json:

{
    "s3": {
        "bucketdir": "bucketdir",
        "bucketuri": "https://s3.amazonaws.com/",
        "bucketname": "bucketname"
    }
}

I get the expected html mutation for the paths uploaded to s3.

mattbain@sole ~/S/_/grunt-email-workflow> grunt cdn:aws_s3
Running "cdn:aws_s3" (cdn) task

cdn:html - branded.html
cdn:html - components.html
cdn:html - transaction.html

Changing /dist/img/mailgun.png -> https://s3.amazonaws.com/bucketname/bucketdir/dist/img/mailgun.png

Done.

Can you provide any further details to diagnose?

taeo commented 4 years ago

@Lieneke - Did this solve your issue?