Darshan Mehta Darshan Mehta - 24 days ago 6
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:

<Error><Code>NotImplemented</Code>
<Message>A header you provided implies functionality that is not implemented</Message>
<Header>Transfer-Encoding</Header>


From the docs, it seems
curl
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

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?

Comments