Merge "mw.Upload.BookletLayout: Don't explode when the API call fails with 'exception'"
[lhc/web/wiklou.git] / resources / src / mediawiki / mediawiki.Upload.js
index d80b4eb..8a74ffc 100644 (file)
 
        UP = Upload.prototype;
 
+       /**
+        * Get the mw.Api instance used by this Upload object.
+        *
+        * @return {jQuery.Promise}
+        * @return {Function} return.done
+        * @return {mw.Api} return.done.api
+        */
+       UP.getApi = function () {
+               return $.Deferred().resolve( this.api ).promise();
+       };
+
        /**
         * Set the text of the file page, to be created on file upload.
         *