This question already has an answer here:
- How do I send a cross-domain POST request via JavaScript? 17 answers
- Ways to circumvent the same-origin policy 11 answers
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".