Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

params in the file list is ignored #90

Open
evanhuang8 opened this issue Nov 19, 2015 · 2 comments
Open

params in the file list is ignored #90

evanhuang8 opened this issue Nov 19, 2015 · 2 comments

Comments

@evanhuang8
Copy link

It seems that the per file params is not respected. For the following code:

     prod:
        options:
          bucket: 'some-bucket'
          differential: true
          access: 'public-read'
          gzipRename: 'ext'
        files: [
          expand: true
          cwd: 'temp/static/'
          src: ['**/*']
          dest: '/'
        ,
          src: [
            'temp/static/js/app.*.js'
            'temp/static/js/libraries.*.js'
          ]
          dest: '/js/'
          params:
            CacheControl: '3600'
        ]

The cache control is not set on S3, however, when I move the params into the options part, it will set the cache control for all files in the file list. Any thoughts?

@MathieuLoutre
Copy link
Owner

That's quite strange. If you look at L298, it's definitely trying to read from there.
Could you try adding a params that's not allowed?

params:
     TestParam: '360'

L294/295 should throw. If so, then L298 should also work. What do you think?
Maybe try logging filePair.params after L298 to see the object. If the params are in there, then they should be applied (unless there's a bug down the road).

@bluecollarcoder
Copy link

I'm also having this problem.

{
  options : {
    params : {
      ContentEncoding : 'gzip',
      CacheControl : 'max-age=86400'
    },
    accessKeyId : '<%= AWSAccessKeyId %>',
    secretAccessKey : '<%= AWSSecretKey %>',
    bucket : '<%= s3_bucket %>',
    differential : true
  },
  redirect : {
    options : {
      params : {
        WebsiteRedirectLocation : '/<%= path %>',
        ContentType: 'text/plain'
      }
    },
    files : [
      {
        action : 'upload',
        expand : true,
        cwd : 'dist',
        src : [ 'redirect.html' ],
        dest : '<%= path %>/'
      }
    ]
  }
}

The WebsiteRedirectLocation and ContentType params have no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants