WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#46282 closed defect (bug) (duplicate)

Dotx uploading fails, even added to upload_mimes filter

Reported by: kisabelle Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.0.1
Component: Upload Keywords:
Focuses: Cc:

Description

function custom_upload_mimes ( $mime_types ) {
  $mime_types['dotx'] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.template';
  return $mime_types;
}
add_filter('upload_mimes', 'custom_upload_mimes');

Even when added using the upload_mimes filter, MS Word Letterhead .dotx files fail to upload with the following error:

Sorry, this file type is not permitted for security reasons.

The only way to successfully upload is to allow unfiltered uploads.

Change History (1)

#1 @desrosj
4 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Severity changed from major to normal
  • Status changed from new to closed
  • Version changed from 5.0.3 to 5.0.1

Hi @kisabelle,

Thanks for opening this! There is an issue tracking the overall fix to mime type related issues in #40175. This is most likely a side effect of r43988.

I will note this file type and ticket on #40175, but feel free to add any additional details you have to offer there!

Note: See TracTickets for help on using tickets.