8000 Can't set Cache-Control header · Issue #36 · anacronw/multer-s3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Can't set Cache-Control header #36
Closed
@lukechilds

Description

@lukechilds

As far as I can tell there is no way to set a Cache-Control header from the MulterS3 parameters. I really really don't wanna make a separate request to S3 just to update this setting 😆

Should be pretty easy to bake this into MulterS3, would you accept a PR for this?

I'm thinking an optional parameter, something like this:

var upload = multer({
  storage: multerS3({
    s3: s3,
    bucket: 'some-bucket',
    cacheControl: 'max-age=31536000',
    acl: 'public-read',
    key: function (req, file, cb) {
      cb(null, Date.now().toString())
    }
  })
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0