Page MenuHomePhabricator

handle upload filesize > maxfilesize gracefully
Closed, ResolvedPublic


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".

Version: unspecified
Severity: normal


Unknown_error.png (439×1 px, 25 KB)



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:15 AM
bzimport added a project: UploadWizard.
bzimport set Reference to bz35916.
bzimport added a subscriber: Unknown Object (MLST).

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. ***

neilk wrote:

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
Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:26 AM
Gilles added a project: Multimedia.
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:21 AM