- This module performs a server-side validation for the extension.
- It works on the upload type file field used in any entity.
- It can perform a more secure and reliable check on the file's mime type and compare that to the allowed file extensions.
- It helps in site making malicious type uploads free for security purposes.
- Logs the upload if found malicious i.e if not of the type of extension which is being requested.
- Provides extension configurable, so that it won't get outdated.
Installation
composer require 'drupal/file_mime_validator'
drush en file_mime_validator
Configuration
- Navigate to Admin->Config->System->File Mime Validator
- Configure file mime types by adding to default ones.
Supporting organizations:
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.- Project categories: Media, Security
- Ecosystem: Security, File MIME, ImageField, FileField
291 sites report using this module
- Created by akshay.singh on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
3.0.0
released 9 October 2025
Works with Drupal: ^10 || ^11
Install:
Development version: 3.x-dev updated 9 Oct 2025 at 20:21 UTC
8.x-2.0
released 27 January 2023
Works with Drupal: ^9 || ^10
Install:
Development version: 8.x-2.x-dev updated 20 Apr 2024 at 16:04 UTC
8.x-1.1
released 10 January 2023
Works with Drupal: 8.x
Install:
Development version: 8.x-1.x-dev updated 20 Apr 2024 at 15:25 UTC


