Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So I solved this, and hopefully this will help some other people (nobody else seems to have this problem though, so maybe my setup is just different). My issue turned out to be with the s3upload.js library. Two things:</p> <ol> <li>I wanted to do authenticated-read, which in the example sign_s3 view was set to public-read. Just changing it in the view doesn't help--x-amz-acl:public-read is also hardcoded in s3upload.js, in the function uploadToS3 (line 107). So you have to change this to match your view, otherwise I think the signature encoding never matches the CORS request headers.</li> <li><p>The special characters =, +, and / were killing me. They are mentioned at the bottom of this <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationQueryStringAuth" rel="nofollow noreferrer">Amazon S3 article</a> as things to watch out for, so I made sure the hashing algorithm replaced them. The issue is that even though my hashing algorithm in my view was correctly replacing those three characters with the escape characters, s3upload was decoding and recoding them as =, +, and /. I changed one line in executeOnSignedUrl (line 71):</p> <pre><code> return callback(result.signed_request, result.url); //return callback(decodeURIComponent(result.signed_request), result.url); </code></pre></li> </ol> <p>And now it magically works! Note that this is very similar to <a href="https://stackoverflow.com/questions/11820566/inconsistent-signaturedoesnotmatch-amazon-s3-with-django-pipeline-s3boto-and-st">this SO solution</a>, just specific to the s3upload.js library.</p> <p>As a side note--S3 also does not seem to like spaces in the key names (I did read this somewhere in Amazon documentation, I think), which was a separate problem I had...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload