Amazon S3 Add METADATA to existing KEY

Posted by Daveo on Stack Overflow See other posts from Stack Overflow or by Daveo
Published on 2010-04-10T15:00:24Z Indexed on 2010/04/10 15:03 UTC
Read the original article Hit count: 409

Filed under:
|

In S3 REST API I am adding metadata to an existing object by using the PUT (Copy) command and copying a key to the same location with 'x-amz-metadata-directive' = 'REPLACE'

What I want to do is change the download file name by setting:

Content-Disposition: attachment; filename=foo.bar;

This sets the metadata correctly but when I download the file it still uses the keyname instead of 'foo.bar'

I use a software tool S3 Browser to view the metadata and it looks correct (apart from 'Content-Disposition' being all lower case as that's was S3 ask me to sign)

Then using S3 Browser I just pressed, then save without changing anything and now it works???

What am I missing how come setting a metadata 'Content-Disposition: attachment; filename=foo.bar;' from my web app does not work but does work from S3 Browser?

© Stack Overflow or respective owner

Related posts about amazon-s3

Related posts about s3