Cross domain uploading for jQuery File Upload
I know this has been asked on SO before, but everything I've tried doesn't
seem to work...I'm using jQuery File Upload by BlueImp, and I need to do a
cross-domain upload (from sub.site.net to files.site.net)
I've looked at how to do it, and here's my headers for index.php (on the
receiving server)
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Access-Control-Allow-Headers: *');
Looks right to me...
When I go to upload the file, I get this error:
XMLHttpRequest cannot load http://files.site.net/. Origin
http://sub.site.net is not allowed by Access-Control-Allow-Origin.
So apparently something's wrong with the headers. Can anyone help me with
this? Let me know if more info is needed...
BTW the upload folder does have write permissions. Thanks!
No comments:
Post a Comment