Posting image to S3 Conflicting query string parameters
Asked Answered
R

3

7

I'm trying to post to s3, but get back an error of this:

<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 does conflicting query string parameters mean?

Resurrect answered 11/1, 2012 at 18:0 Comment(0)
R
7

If you are using an HTML form to upload the file, make sure you have the form's enctype set to multipart/form-data. I was receiving the exact same error before including that attribute.

e.g.

<form action="https://mybucket.s3.amazonaws.com/" 
   method="POST" 
   enctype="multipart/form-data">
Roughen answered 22/9, 2012 at 17:20 Comment(0)
M
1

This was an issue for me when trying to POST a file using jQuery and Ajax. It turned out that the actual file was not transmitted. When I fixed that, S3 stopped complaining.

Metalinguistics answered 25/8, 2013 at 20:46 Comment(0)
I
0

I had similar issue. I was using chrome rest client to test s3 uploads. My issue was that I had 2 post bodies - one raw and one structured and that cause amazon to send me this error.

I suspect that you probably have multiple post bodies in your request.

Iverson answered 12/1, 2012 at 4:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.