Darshan Mehta Darshan Mehta - 9 months ago 46
PHP Question

Amazon S3 bucket file upload : Invalid Transfer encoding header

I am trying to upload a file to S3 bucket as per this example. I have created a shell script and changed param values, when I try to execute it, following error message is returned:

<Message>A header you provided implies functionality that is not implemented</Message>

From the docs, it seems
adds this header when it can't determine the content length. I don't know whether it's possible to change curl config to skip including Transfer Encoding header, but have tried the following:

  • Changed content type to multipart

  • Included content length header

  • Removed content type header

I am still getting the same error. Do I need to change anything else to make it work?

Answer Source

From NotImplemented it is possible you are not passing the filename or Body is an empty string.

Can you echo the entire curl command and arguments before executing it?