[wp-trac] [WordPress Trac] #32746: Media Upload mimeType validation bug
WordPress Trac
noreply at wordpress.org
Wed Jun 24 00:45:58 UTC 2015
#32746: Media Upload mimeType validation bug
--------------------------+-----------------------------
Reporter: vivekbhusal | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.3
Component: Media | Version: 4.2.2
Severity: normal | Resolution: fixed
Keywords: needs-patch | Focuses: javascript
--------------------------+-----------------------------
Comment (by vivekbhusal):
Replying to [comment:1 wonderboymusic]:
> Shouldn't it be:
>
> {{{
> var type = this.props.get('type');
> return ! type || -1 !== attachment.get('mime').indexOf( type );
> }}}
>
> Can you try that and see if it works?
It should be type.indexOf(attachment.get("mime");
"type" being the array of all supported mime types and
attachment.get("mime") being the mime type of current file.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32746#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list