Last modified: 2012-05-25 03:02:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37916, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35916 - handle upload filesize > maxfilesize gracefully
handle upload filesize > maxfilesize gracefully
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 35262 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-12 16:18 UTC by Chris McMahon
Modified: 2012-05-25 03:02 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
UploadWizard errors after processing large file (25.10 KB, image/png)
2012-04-12 16:18 UTC, Chris McMahon
Details

Description Chris McMahon 2012-04-12 16:18:15 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".
Comment 1 Brion Vibber 2012-04-13 18:42:52 UTC
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.
Comment 2 Chris McMahon 2012-04-13 20:01:15 UTC
*** Bug 35262 has been marked as a duplicate of this bug. ***
Comment 3 Neil Kandalgaonkar 2012-04-13 23:45:30 UTC
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
Comment 4 Erik Moeller 2012-05-05 23:15:51 UTC
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/ .

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links