Make WordPress Core

Opened 16 years ago

Closed 10 years ago

Last modified 10 years ago

#14244 closed defect (bug) (fixed)

Upload file types should be checked BEFORE uploading.

Reported by: ipstenu Owned by: ocean90
Priority: normal Milestone: 4.6
Component: Media Version:
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses:

Description

Wanna get frustrated? Try uploading a 50 meg video and realizing you forgot to set your Upload file types to allow m4v.

Is there any way this can be checked BEFORE the file gets uploaded? As it stands today, you upload THEN it checks and deletes. Arg :)

Attachments (1)

14244.diff (2.0 KB ) - added by polevaultweb 10 years ago.

Download all attachments as: .zip

Change History (14)

#1 @nacin
16 years ago

  • Component GeneralMedia
  • Milestone Awaiting ReviewFuture Release

#2 @markoheijnen
14 years ago

Is this still the case. I would say this is fixed by using Plupload?

#3 @Ipstenu
13 years ago

This is NOT fixed by Plupload and is still a problem today.

#4 @ericlewis
12 years ago

  • Keywords needs-patch added
  • Type defect (bug)enhancement

Yes, we can do something similar to the early image detection in the FilesAdded callback in wp.Uploader.

#5 @chriscct7
11 years ago

  • Type enhancementdefect (bug)

If its not an allowable filetype, it seems more like a bug that it doesn't do this detection earlier

@polevaultweb
10 years ago

#6 @polevaultweb
10 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Patch added that tells plupload the allowed mime types, and throws the error early if the file upload is not allowed. To test, the file would need to be dragged and dropped onto uploader, as plupload restricts the selection of those file types with this implementation.

#7 @SergeyBiryukov
10 years ago

  • Milestone Future Release4.6

This ticket was mentioned in Slack in #core-images by joemcgill. View the logs.


10 years ago

This ticket was mentioned in Slack in #core-images by joemcgill. View the logs.


10 years ago

#10 @ocean90
10 years ago

@azaozz Can you take a look at 14244.diff please?

#11 @ocean90
10 years ago

  • Owner set to ocean90
  • Resolutionfixed
  • Status newclosed

In 37727:

Media: Pass allowed file extensions to Plupload.

Plupload's mime_types filter (http://www.plupload.com/docs/Options#filters.mime_types) allows us to inform a user about an unsupported file before the file gets uploaded.

Props polevaultweb.
Fixes #14244.

#12 @ocean90
10 years ago

In 37728:

Media: Use the correct variable for the file object.

See #14244.

This ticket was mentioned in Slack in #core by drew. View the logs.


10 years ago

Note: See TracTickets for help on using tickets.