WP Manifestindependent plugin directory
manifest / media / trust-my-mimes

Trust My MIMEs

Prevents WordPress from blocking file uploads for additional MIME types added to WordPress or existing ones when the server and WordPress MIME type recognition don't match but both mime types are allowed.

by Samuel Aguilera · github.com/samuelaguilera/trust-my-mimes

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/samuelaguilera/trust-my-mimes/archive/refs/heads/main.zip

Declares an update source (https://trustmymimes.samuelaguilera.com), so updates arrive through the plugin's own updater.

Readme

Description

Prevents WordPress from blocking file uploads for additional MIME types added to WordPress or existing ones when the server and WordPress MIME type recognition don't match but both mime types are allowed.

Real world example

You have added DXF ('dxf' => 'image/vnd.dxf') to the allowed WordPress mimes using the upload_mimes filter, but WordPress is still saying Sorry, this file extension is not permitted for security reasons.

This is because the server is detecting this file with a different mime type, probably as text/plain

text/plain is also a mime type allowed (by default), so there's no reason to block the upload of this file.

Enabling the plugin will resolve this issue.

Requirements

  • PHP 8.0 or newer.
  • WordPress 6.7 or newer

The plugin may work with older versions, but it hasn't been tested and it's not supported.

Usage

  • Install and activate it as usual.
  • Enjoy! No settings!

Read the full README on GitHub →