title: How to handle cross domain iframe file upload json response?
body: <p>I'm building an files upload API.  </p>
  
  <p>Basically, the user will have to POST the files with his/her api_key + signature to my web service.  Then my web service replies back with a JSON response.  I'm wondering how can this process work asynchronously?  </p>
  
  <p>Assuming that the user POST the request in a form setting the target to an iframe.  The JSON response will be sent back to the user on his/her iframe with content type set as "text/html".  It is set as "text/html" instead of "application/json" because I want to avoid having a "pre" tag injected by the browser around the JSON response.  Anyway, how does the user read that JSON response if the iframe and the parent window have different domain?  There is going to be a cross domain policy issue.</p>
  
  <p>Dynamically create "script" tag plus JSONP won't work in this case because I need to POST in order to upload.  JSONP only works with GET requests.</p>