Publish image on S3 Query string parameter conflict

I am trying to send a message to s3, but I will return to the error:

<Error> <Code>InvalidArgument</Code> <Message>Conflicting query string parameters: acl, policy</Message> <ArgumentValue>acl</ArgumentValue> <ArgumentName>ResourceType</ArgumentName> <RequestId>AD52BCA534..</RequestId> <HostId>gdICZHAf...</HostId> </Error> 

What do conflicting query string parameters mean?

+4
source share
3 answers

If you use an HTML form to upload a file, make sure you have the enctype form set to multipart/form-data . I was getting the same error before including this attribute.

eg.

 <form action="https://mybucket.s3.amazonaws.com/" method="POST" enctype="multipart/form-data"> 
+3
source

This was a problem for me when trying to post a file using jQuery and Ajax. It turned out that the actual file was not transferred. When I fixed it, S3 stopped complaining.

+1
source

I had a similar problem. I used the chrome client to test s3 boot. My problem was that I had 2 post-bodies - one raw and one structured, and this caused the Amazon to send me this error.

I suspect that you probably have several mail bodies in your request.

0
source

Source: https://habr.com/ru/post/1390496/


All Articles