After version 4.24.9 WordPress File Upload plugin performs MIME type validation of the uploaded files.

MIME type indicates the nature and format of a file.

During the validation, the MIME type needs to match with the extension of the file. For example, the MIME type of an image file with .png extension must be image/png.

The plugin keeps a standard list of mappings between extensions and MIME types. If an uploaded file’s MIME type and extension combination is not in this list, then the file is considered to be suspicious and it is rejected, showing the following message to the user:

However, MIME type validation is sometimes very strict and may prevent the upload of files that are fine.

In order to cope with this problem, the plugin introduced Quarantine feature. When this feature is activated, the plugin does not reject the uploaded files for which it cannot very their MIME type, but it adds them into the quarantine.

Here are the steps to make the plugin accept files that were rejected for a MIME type validation reason:

1. Activate Quarantine feature from the plugin’s Settings (instructions).

2. Upload the file again. This time, the error message shown to the user will be the following, meaning that the file has been quarantined:

3. Go to Quarantine tab in Dashboard area of the plugin and locate the file:

4. Press to accept the file.

5. In the next screen, check the box to add an upload exception, so that all uploaded files from now on that have the same extension and MIME type are automatically accepted by the plugin.

6. Press Accept and Add Exception button.

The file will be stored in its final location.

An upload exception has also been added in Exceptions page so that all new files that will be uploaded with the same extension and MIME type will be automatically accepted by the plugin.

File is Suspicious and Was Rejected Error in WordPress File Upload Plugin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.