Skip to content
Advertisement

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?

Advertisement

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?

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement