HomePhabricator

mediawiki.api: Add parameter ajaxOptions to postWithToken()

Description

mediawiki.api: Add parameter ajaxOptions to postWithToken()

This allows to upload a file with token.

var api = new mw.Api();
api.postWithToken(
'edit',
{

		action: 'upload',
		format: 'json',
		filename: 'Foobar.png',
		file: file

},
{

		contentType: 'multipart/form-data'

}
);

Change-Id: I7a0fec3c1ef2c7881d4c04b1a9dd44fac02cb346

Details

Provenance
FomafixAuthored on
KrinkleCommitted on May 15 2014, 5:32 PM
Parents
rMW62976da749f8: Merge "Create Parser::stripOuterParagraph to avoid code duplication"
Branches
Unknown
Tags
Unknown
ChangeId
I7a0fec3c1ef2c7881d4c04b1a9dd44fac02cb346