-
Notifications
You must be signed in to change notification settings - Fork 187
Cross-Domain POST not working #47
Comments
There is nothing special with this POST compared to normal Django posts, as far as I know. Wouldn't you also get into trouble with Django's CSRF protection? I would suggest: Develop locally and run everything on the same server. I don't see it as necessary functionality for what I try to keep as a minimal example implementation. I have never needed implementing OPTIONS on either side of the request, and I would doubt the Django project have given too many thoughts about it. So good luck! |
Hi. I got it working, but had to write a separate view to return the JSON and headers that jQuery File Upload expects for the GET/OPTIONS and the POST. I'm super-slammed at the moment, but when I get some time I'll share my code. |
Great that you found a solution! I'll have a look when you post your code :) |
In the upstream project - the list of already uploaded images are loaded by sending an OPTIONS request to the server. We are implementing it using the GET command. It may be causing the problem mentioned. Maybe it's worth thinking sometime to implement the /view route as in the upstream. |
http://stackoverflow.com/questions/18181261/handle-options-request-with-djangos-built-in-server may point us in the right direction. |
When doing a cross-domain POST, an OPTIONS request is issued first. This application does not send a proper response for OPTIONS, thus causing the subsequent POST to fail.
I have this project running on my WebFaction account at: http://uploader.btaylordesign.webfactional.com, and am attempting to post from a static, JavaScript application running in Nginx on my local computer.
The text was updated successfully, but these errors were encountered: