2

I am using FineUploader to upload files to Amazon S3, and I would like to add the Content-Disposition header to the files. I have tried this (in CoffeeScript):

request:
      endpoint: "..."
      accessKey: "...
      customHeaders:
        "Content-Disposition": "attachment;"

This hasn't worked for me. Any tips on what I should do instead?

Thanks.

Vidya
  • 29,932
  • 7
  • 42
  • 70
  • Please see https://github.com/Widen/fine-uploader/issues/1214. In the meantime, you can generate a signed URL server-side using the AWS SDK with the proper override header for content-disposition and use that client-side. – Ray Nicholus Jun 27 '14 at 20:58
  • Got it. This is for a web app written in Scala, and rather than import another jar file for the sake of a workaround on a feature that isn't high-priority, I am content to wait until your team gets around to adding this feature. Thanks for the input. – Vidya Jun 27 '14 at 21:36

1 Answers1

1

As I mentioned in my comment this is a feature request to be addressed as described in #1214.

Until that is complete, you can generate a signed URL server-side using the AWS SDK with the proper override header for content-disposition and use that client-side. This is possible via the S3 API, and several SDKs probably expose signed URL generation and header overrides. I noticed that the scala SDK does the former, but not the latter. Here is another SO case that addresses this in PHP though: Unable to override content disposition header in s3.

Community
  • 1
  • 1
Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82