Merge "mw.api.upload: Suppress default API call timeout"
authorMarkTraceur <mholmquist@wikimedia.org>
Wed, 21 Sep 2016 18:48:56 +0000 (18:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 21 Sep 2016 18:48:56 +0000 (18:48 +0000)
resources/src/mediawiki/api/upload.js

index c2da10e..8169449 100644 (file)
                        this[ this.needToken() ? 'postWithEditToken' : 'post' ]( data, {
                                // Use FormData (if we got here, we know that it's available)
                                contentType: 'multipart/form-data',
+                               // No timeout (default from mw.Api is 30 seconds)
+                               timeout: 0,
                                // Provide upload progress notifications
                                xhr: function () {
                                        var xhr = $.ajaxSettings.xhr();