Because we need to upload a file. Only firefox 3.5 support XHR file uploads. The rest of the browsers have to target an iframe to not cause the page to refresh.
--michael
Roan Kattouw wrote:
2009/8/15 Michael Dale mdale@wikimedia.org:
This is needed for iframe target background upload tasks. ie you upload a file and then you want to take the name of the file you uploaded and use that to insert the image into the edit window. With mime as "application/json" the browser promts the user to "save" the file and we can't eval the document text result in the iframe.
Why use an iframe? Why not something like $.post(), or if that doesn't upload properly, build a form and submit it?
Roan Kattouw (Catrope)
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api