django-s3direct icon indicating copy to clipboard operation
django-s3direct copied to clipboard

Stuck in loop

Open jf-cucalon opened this issue 4 years ago • 2 comments

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 ?

jf-cucalon avatar Aug 23 '20 18:08 jf-cucalon

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 avatar Apr 10 '22 00:04 Ukie1

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

Ukie1 avatar Apr 10 '22 01:04 Ukie1