Change Content-Disposition of existing S3 object

前端 未结 2 655
一个人的身影
一个人的身影 2020-12-09 19:55

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\' = \'

2条回答
  •  旧时难觅i
    2020-12-09 20:38

    Edited for clarity:

    Content-Disposition must be set explicitly and not included as x-amz-meta-Content-Disposition. All metadata header names must start with "x-amz-meta-" and be all lowercase.

    Thanks to @Eyal for clarifying.

    Original:

    >SOLVED:
    >
    >The Doco at http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RESTAuthentication.html
    >
    >seems to be wrong it says:
    >
    >Notice how the 'x-amz-' headers are sorted, white-space trimmed, converted tolowercase, and multiple headers with the same name have been joined using a comma toseparate values.
    >
    >Note how only the Content-Type and Content-MD5HTTPentity headers appear in the StringToSign .The otherContent-* entity headers do not.
    However Content-Disposition must be set specifically and not included as : x-amz-meta-Content-Disposition
    >
    >It now works fine.
    

提交回复
热议问题