Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#45622 closed defect (bug) (duplicate)

VTT Mime Type fails upload

Reported by: birgire Owned by:
Priority: normal Milestone:
Component: Upload Version: 5.0.1
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

The text/vtt is an allowed mime type but doesn't match the text/plain from the $real_mime in wp_check_filetype_and_ext() and after 5.0.1 that function returns:

Array ( [ext] => [type] => [proper_filename] => )

but did return before:

Array ( [ext] => vtt [type] => text/vtt [proper_filename] => )

This was reported by Prast ​here.

Similar has been reported for CSV in #45615

I suspect the same might be true for some of the other supported text formats:

'csv' => 'text/csv',
'tsv' => 'text/tab-separated-values',
'ics' => 'text/calendar',
'rtx' => 'text/richtext',
'css' => 'text/css',
'htm|html' => 'text/html',
'vtt' => 'text/vtt',

Attachments (2)

45622.diff​ (519 bytes ) - added by birgire 8 years ago.
test.vtt​ (1.2 KB ) - added by birgire 8 years ago.
Sample file from ​https://w3c.github.io/webvtt/#introduction-caption

Download all attachments as: .zip

Change History (6)

@birgire
8 years ago

#1 @tellyworth
8 years ago

Thanks for the report - yes I believe you're right about at least some of those other formats also. There are further complications as well. I like your approach of adding an extra entry to the wp_get_mime_types array, that might help with some of the other issues. I'm working on testing some variations.

#2 @SergeyBiryukov
8 years ago

  • Component Filesystem API → Upload
  • Milestone Awaiting Review → 5.0.2

#3 @pento
8 years ago

  • Milestone 5.0.2 → 5.0.3

#4 @joemcgill
8 years ago

  • Milestone 5.0.3
  • Resolution → duplicate
  • Status new → closed

To keep this and related conversations in one place, I'm going to close this in favor of #45615.

Note: See TracTickets for help on using tickets.