mediawiki.api.upload: Correct response handling of #uploadWithFormData
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 13 Jul 2015 18:14:21 +0000 (20:14 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 16 Jul 2015 14:42:28 +0000 (14:42 +0000)
commit00fb9b72ce57f0719f3d39c70c6b2e98a628a638
tree911e24890e97781895d399962572f417bf393f0d
parent00e5dbdcc6fd20d8482a2db585fea5c202b022f4
mediawiki.api.upload: Correct response handling of #uploadWithFormData

* Reject instead of resolving when API reports errors, like #uploadWithIframe
* Purge bad tokens correctly, like #uploadWithIframe

Change-Id: I42fe6f6e921fe29dd96ce5b75ad61014a7346fc9
resources/src/mediawiki.api/mediawiki.api.upload.js