Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#19001 closed defect (bug) (fixed)

Media uploader (plupload) - exceeding max file size doesn't currently give feedback/error

Reported by: wpsites's profile WPsites Owned by: azaozz's profile azaozz
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.3
Component: Media Keywords: has-patch
Focuses: Cc:

Description

When you upload an image of a larger size than the web server and plupload allows nothing happens.

Surely it should let the user know the file is too large and needs to be less than X.

I know it says in the text below that the max file size is X but when you are uploading media you don't always know how big the file you are uploading is. currently if you try uploading a larger file nothing happens, no upload, no warning, nothing.

I can confirm this in Firefox, Chrome uploading media from within a post and from the media section.

Attachments (2)

19001.patch (778 bytes) - added by kurtpayne 12 years ago.
Show error message when upload size exceeds max upload limit
19001.1.patch (1.0 KB) - added by kurtpayne 12 years ago.
Show error message, don't create duplicate file entries in the queue

Download all attachments as: .zip

Change History (13)

#1 @SergeyBiryukov
12 years ago

  • Milestone changed from Awaiting Review to 3.3

Confirmed. The error is displayed when uploading from Media Library, but not from Edit Post screen.

@kurtpayne
12 years ago

Show error message when upload size exceeds max upload limit

#2 @kurtpayne
12 years ago

  • Cc kpayne@… added

Wait, there's a problem with 19001.patch if you add a file under the size limit, the one over the limit, it duplicates the files in the queue list. Working on a fix.

@kurtpayne
12 years ago

Show error message, don't create duplicate file entries in the queue

#3 @kurtpayne
12 years ago

  • Cc kpayne@… removed
  • Keywords has-patch added

When you add one file that's in error, the Error event fired and the FilesAdded event was never being fired. 19001.1.patch adds a check to ensure that the file is in the queue list so that an error message can be displayed next to the file name.

When you upload multiple files, the Error event was still being fired, but when the upload the FilesAdded event was still being called after each upload was done (regardless of error state). This is why there were duplicates in the file list in 19001.patch. In the 19001.1.patch, I added a check in the fileQueued() function to make sure duplicates weren't being created.

When uploading a file that is too large, the error message is:

You may only upload 1 file.

This may be confusing for some users. It is only one file, it just happens to be larger than the allowed upload size.

#4 @nacin
12 years ago

  • Owner set to azaozz
  • Status changed from new to assigned

Assigning to azaozz for review.

#5 @landwire
12 years ago

  • Cc landwire added

If you choose let's say 5 files in one go to upload and drag them across, there should be according error messages (too big - wrong extension - etc). I'm sure you are onto that.

ALSO: the "Cancel Upload" button does not seem to work!!!

#6 @azaozz
12 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Seems this was fixed as part of a different ticket. Feel free to reopen if there is still no error shown for files that are too big.

#8 @kurtpayne
12 years ago

  • Cc kpayne@… added

@azaozz, when uploading multiple files, some which are too large, there is no error message displayed. All files show up in the queue list. This can be replicated via drag-and-drop and via "select files." Tested in Firefox and Chrome.

Screen shot: http://cl.ly/2P3Q2s3a2p1J2S2X1Q1Y

Is this expected behavior?

#9 @nacin
12 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#10 @nacin
12 years ago

  • Type changed from enhancement to defect (bug)

#11 @SergeyBiryukov
12 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.