Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#39777 closed defect (bug) (duplicate)

Upload of certain mime type buggy

Reported by: 1manfactory's profile 1manfactory Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.2
Component: Upload Keywords:
Focuses: Cc:

Description

I am using the following code to grand uploads for epub, pdf and mobi files inside my functions.php

<?php
function my_upload_mimes($mimes) {
        
        $mimes['epub'] = 'application/epub+zip';
        $mimes['mobi'] = 'application/octet-stream'; 
        $mimes['pdf'] = 'application/pdf';

    return $mimes;
}
add_filter('upload_mimes', 'my_upload_mimes');

It used to work until recently. All I get is the error message that I am not allowed to upload epub files.

Funny thing is that it only happens with some epub files.

It's not size related. I am having the same trouble on test and production environment.

It seems to me that the way the included mimetype file inside the zip container is handled wrong

Juergen

Change History (1)

#1 @Clorith
7 years ago

  • Component changed from General to Upload
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi,

This is being tracked as part of #39550 where an added mime-check from 4.7.1 is behaving differently depending on your server setup.

Note: See TracTickets for help on using tickets.