MarkTraceur has submitted this change and it was merged.
Change subject: mw.api.upload: Suppress default API call timeout
......................................................................
mw.api.upload: Suppress default API call timeout
mw.Api sets a default timeout of 30 seconds, meaning that if the
request takes more than that, it will be aborted. This is reasonable
in most cases, but file uploads can easily take longer than that.
Bug: T117545
Change-Id: I086108421d229c60f5e9d5c9edb70150d875dcb0
---
M resources/src/mediawiki/api/upload.js
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
MarkTraceur: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/src/mediawiki/api/upload.js
b/resources/src/mediawiki/api/upload.js
index c2da10e..8169449 100644
--- a/resources/src/mediawiki/api/upload.js
+++ b/resources/src/mediawiki/api/upload.js
@@ -283,6 +283,8 @@
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();
--
To view, visit https://gerrit.wikimedia.org/r/310595
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I086108421d229c60f5e9d5c9edb70150d875dcb0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits