X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fmediawiki.Upload.js;h=7e6cfb68fe7ab5fd7f2d2761001238e6d6271fc0;hb=0e339243f1dbbba5f87a54b116c23e0daec8e2e4;hp=23b0900e06f6549385e008d76558a388ffffaedd;hpb=fc1ca75323b5f424a9f8d28d42d85a311ed2f721;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/mediawiki.Upload.js b/resources/src/mediawiki/mediawiki.Upload.js index 23b0900e06..7e6cfb68fe 100644 --- a/resources/src/mediawiki/mediawiki.Upload.js +++ b/resources/src/mediawiki/mediawiki.Upload.js @@ -2,8 +2,6 @@ var UP; /** - * @class mw.Upload - * * Used to represent an upload in progress on the frontend. * Most of the functionality is implemented in mw.Api.plugin.upload, * but this model class will tie it together as well as let you perform @@ -43,6 +41,8 @@ * } ); * } ); * + * @class mw.Upload + * * @constructor * @param {Object|mw.Api} [apiconfig] A mw.Api object (or subclass), or configuration * to pass to the constructor of mw.Api. @@ -276,7 +276,7 @@ this.setState( Upload.State.UPLOADING ); - return this.api.upload( this.getFile(), { + return this.api.chunkedUpload( this.getFile(), { watchlist: ( this.getWatchlist() ) ? 1 : undefined, comment: this.getComment(), filename: this.getFilename(), @@ -313,7 +313,7 @@ this.setState( Upload.State.UPLOADING ); - this.stashPromise = this.api.uploadToStash( this.getFile(), { + this.stashPromise = this.api.chunkedUploadToStash( this.getFile(), { filename: this.getFilename() } ).then( function ( finishStash ) { upload.setState( Upload.State.STASHED );