2009/8/15 Michael Dale <[email protected]>:
> Would anyone object to changing the output mime type of
> ApiFormatJson.php from "application/json" to 'text/javascript' ?
> committed in r55084
>
> 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.
>
A good suggestion I read at
http://simonwillison.net/2009/Feb/6/json/#c43376 is to use
text/javascript only for &format=json when a callback is used, and use
application/json when it's not (&format=jsonfm uses text/html in all
cases, of course).

Roan Kattouw (Catrope)

_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to