Last modified: 2012-05-25 03:02:31 UTC
Created attachment 10409 [details] UploadWizard errors after processing large file Upon attempting to use Special:UploadWizard to upload a file larger than the value for upload_max_filesize the following happens: Wizard allows the user to click "Upload" button for large file File is completely processed, usually taking many minutes Upon completely processing the file, only then is the user presented with these error messages: "Unknown error: unknown/0 of 1 file uploaded/None of the uploads was successful" Suggested behavior: Note: because there is a countdown timer while the file is being processed, one assumes that UploadWizard has at least an approximate idea of the size of the candidate file. UploadWizard should compare the file size of the candidate upload file to the value of upload_max_filesize before attempting to upload the file and either prevent the user from uploading a too-large file (with a reasonable error message naming the value for upload_max_filesize) or... alternately, warn the user that the candidate file may be too large to upload based on the value for upload_max_filesize, and then when upload fails, present a reasonable error msg other than "Unknown error: unknown".
With FileAPI, it should be possible to check the file size before uploading and abort (or better yet, with chunked uploading configured, allow those to actually work!) Could use some better smarts in here yes. Browsers without FileAPI support won't be able to report the file size back, so there's not a lot to be done other than improving the resulting error message.
*** Bug 35262 has been marked as a duplicate of this bug. ***
I felt certain that we had actually written this, but either it got reverted or I never did. See mw.UploadWizardUpload.js line 357. // TODO check max upload size, alert user if too big
This was semi-fixed in https://gerrit.wikimedia.org/r/#/c/4252/ and should be completely fixed in https://gerrit.wikimedia.org/r/#/c/6720/ .