bradleyg / django-s3direct

Directly upload files to S3 compatible services with Django.
MIT License
661 stars 234 forks source link

Stuck in loop #214

Open jf-cucalon opened 4 years ago

jf-cucalon commented 4 years ago

Hi, whenever i try to upload through the admin interface i get stuck posting to get aws v4 signature over and over again, any ideas ?

Ukie1 commented 2 years ago

I can't fully answer your question, but here are two ideas to pursue:

  1. What is the HTTP return code of the request? Looking at the source of generate_aws_v4_signature, it has four return statements. They return HTTP 403, 500, 500, and (likely) 200, respectively. So the HTTP return code says something about what is returning.

  2. Check the javascript console of the web browser. It may be complaining about CORS, e.g.:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://.... (Reason: CORS request did not succeed). Status code: (null).

If it's complaining about CORS, you have to fix your CORS permissions. Not quite sure how yet.

Ukie1 commented 2 years ago

For example, I found I had put http instead of https in the AllowedOrigins of the CORS declaration. Oof.