s3 custom headers

Archived from the Transloadit support forum. Originally posted on February 28, 2011; details may be outdated, see our docs for current behavior. Original thread

I need to achieve what was asked here:

https://community.transloadit.com/t/external_id/tender-questions-14

would it be possible for you to implement?

Thanks

This has been implemented a little afterwards, see the headers option in the S3 store documentation:

http://transloadit.com/docs/s3-store

HTH, Felix

{
    "steps": {
        "store": {
            "robot": "/s3/store",
            "key": "",
            "secret": "",
            "bucket": "",
            "headers": {
                "Content-Type": "${file.mime}",
                "Content-Disposition": "attachment",
                "filename": "${file.name}"
            }
        }
    }
}

hey, so it looks like setting just the “content-disposition” to “attachement” worked as you cannot use variables here. i’m not sure this has any implications on the storage of the file.

No, S3 does not look at those headers for storage. Only X-AMZ- headers are evaluated for that purpose (AFAIK). We’ll add support for variables in the headers in the future.