hooks – What conditions must be met in order to upload .zip file to a multisite WordPress installation?

Question

I cannot upload .zip files to my WordPress network, despite making IMHO everything that is needed. I am still hit by this irritating error.

enter image description here

Details:

  1. I am a super-admin in my network.
  2. The ALLOW_UNFILTERED_UPLOADS flag is set to true
  3. Custom hook of $existing_mimes['zip'] = 'application/zip'; is added
  4. Uploading .zip files is allowed in my network:

enter image description here

Here is entire code of my hook:

function so_387865_custom_upload_mimes ( $existing_mimes ) {
    $existing_mimes['epub'] = 'application/epub+zip';
    $existing_mimes['mobi'] = 'application/x-mobipocket-ebook';
    $existing_mimes['zip'] = 'application/zip';
 
    return $existing_mimes;
}
 
add_filter('upload_mimes', 'so_387865_custom_upload_mimes');

I thought that maybe there’s something wrong with the hook, so I have installed the Enhanced Media Library extension (as suggested in here). All for nothing, as it clearly shows that this MIME type is added:

enter image description here

What else should I do in order to be able to upload .zip files? I am seriously lost!

0
trejder 4 weeks 2021-07-02T13:47:06-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse