Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Posting image to S3 Conflicting query string parameters

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?

like image 522
Brian Avatar asked Jan 11 '12 18:01

Brian


1 Answers

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">
like image 89
ThaDon Avatar answered Sep 18 '22 13:09

ThaDon