This question already has an answer here:
I have some Blob()
object. I want to upload somewhere else (a website that handle user upload through forms).
I can put them in a FormData and send them through an XMLHttpRequest object, but then I can't read the ajax response, because I'm blocked by the same origin policy of the ajax call.
How can I get around this? Is there some way to do a regular upload without using ajax? Is there a way to deal with that "same origin policy" that will work on recent versions of Chrome and Firefox?
edit: Not sure this is a duplicate: I don't control the server being posted, so I'm not OK with just "setting the same origin policy on both domains".
In most cases when someone is trying to use AJAX across domains but is blocked by the same origin policy, it is recommended to AJAX to your own PHP page, and then use cURL to send that data to a different site.
http://curl.haxx.se/