PHPackages                             silverstripe/mimevalidator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. silverstripe/mimevalidator

ActiveSilverstripe-vendormodule[Mail &amp; Notifications](/categories/mail)

silverstripe/mimevalidator
==========================

Checks uploaded file content roughly matches a known MIME type for the file extension.

4.0.0(1y ago)102.0M↓14.1%13[4 issues](https://github.com/silverstripe/silverstripe-mimevalidator/issues)[1 PRs](https://github.com/silverstripe/silverstripe-mimevalidator/pulls)9BSD-3-ClausePHPPHP ^8.3CI passing

Since Aug 4Pushed 9mo ago13 watchersCompare

[ Source](https://github.com/silverstripe/silverstripe-mimevalidator)[ Packagist](https://packagist.org/packages/silverstripe/mimevalidator)[ RSS](/packages/silverstripe-mimevalidator/feed)WikiDiscussions 4 Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (58)Used By (9)

MIME upload validator
=====================

[](#mime-upload-validator)

[![CI](https://github.com/silverstripe/silverstripe-mimevalidator/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-mimevalidator/actions/workflows/ci.yml)[![Silverstripe supported module](https://camo.githubusercontent.com/9b7e93d393a01f6d3091fb30983b870aa863ef076858115faaa1c74b995854ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73696c7665727374726970652d737570706f727465642d3030373143342e737667)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)

Installation
------------

[](#installation)

```
composer require silverstripe/mimevalidator
```

Introduction
------------

[](#introduction)

Checks uploaded file content roughly matches a known MIME type for the file extension.

It can be used with `FileField` or any subclasses like `UploadField`.

For example, it will fail validation if someone renames a `.exe` file to `.jpg`and attempts to upload the file.

Installation via Composer
-------------------------

[](#installation-via-composer)

Install with composer by running `composer require silverstripe/mimevalidator` in the root of your Silverstripe project.

Silverstripe CMS Recipe 4.6 and above include this module via `silverstripe/recipe-core`. Therefore, it is unnecessary to directly install this module if your project has been upgraded to, or was created with CMS Recipe 4.6.0 or later.

Configuration
-------------

[](#configuration)

Read [Allowed file types on the Silverstripe CMS documentation](https://docs.silverstripe.org/en/developer_guides/files/allowed_file_types/) for details on configuring MIME type validation.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance44

Moderate activity, may be stable

Popularity50

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~32 days

Total

58

Last Release

284d ago

Major Versions

2.5.0 → 3.0.0-rc12023-03-30

2.x-dev → 3.0.12024-02-12

3.1.x-dev → 4.0.0-alpha12024-09-30

3.x-dev → 4.0.0-rc12025-04-02

3.0.x-dev → 4.0.x-dev2025-06-19

PHP version history (5 changes)2.1.0-beta1PHP ^7.1 || ^8

2.3.0PHP ^7.3 || ^8

2.4.0PHP ^7.4 || ^8

3.0.0-alpha1PHP ^8.1

4.0.0-alpha1PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/654636?v=4)[Aaron Carlino](/maintainers/unclecheese)[@unclecheese](https://github.com/unclecheese)

![](https://www.gravatar.com/avatar/b0cba8b534e20e6ab4fff555a97b237a18436ebca1446fc0b29c8a8b504038b9?d=identicon)[GuySartorelli](/maintainers/GuySartorelli)

![](https://avatars.githubusercontent.com/u/111025?v=4)[Ingo Schommer](/maintainers/chillu)[@chillu](https://github.com/chillu)

![](https://www.gravatar.com/avatar/a25bc04c5720a36869d5a39c6449dde7eb43e19b7c8e666d5f632d6a9ab440b1?d=identicon)[emteknetnz](/maintainers/emteknetnz)

![](https://www.gravatar.com/avatar/afbb3dcc9ef29c1a6eedd6addcae5fce9ab1271915a85a4c349301b71237368d?d=identicon)[silverstripe-machine01](/maintainers/silverstripe-machine01)

![](https://www.gravatar.com/avatar/be6648e60fbab6f70bfc34dd8c14259562d28a47510a934ea9c01fe98633f3c2?d=identicon)[sminnee](/maintainers/sminnee)

![](https://avatars.githubusercontent.com/u/1168676?v=4)[Maxime Rainville](/maintainers/maxime-rainville)[@maxime-rainville](https://github.com/maxime-rainville)

---

Top Contributors

[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (42 commits)")[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (34 commits)")[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (20 commits)")[![dhensby](https://avatars.githubusercontent.com/u/563596?v=4)](https://github.com/dhensby "dhensby (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![micmania1](https://avatars.githubusercontent.com/u/881537?v=4)](https://github.com/micmania1 "micmania1 (5 commits)")[![dnsl48](https://avatars.githubusercontent.com/u/9313746?v=4)](https://github.com/dnsl48 "dnsl48 (3 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (2 commits)")[![ss23](https://avatars.githubusercontent.com/u/191510?v=4)](https://github.com/ss23 "ss23 (2 commits)")[![shoaibali](https://avatars.githubusercontent.com/u/180494?v=4)](https://github.com/shoaibali "shoaibali (1 commits)")[![ishan001](https://avatars.githubusercontent.com/u/10520853?v=4)](https://github.com/ishan001 "ishan001 (1 commits)")[![axllent](https://avatars.githubusercontent.com/u/1463435?v=4)](https://github.com/axllent "axllent (1 commits)")[![edwilde](https://avatars.githubusercontent.com/u/415374?v=4)](https://github.com/edwilde "edwilde (1 commits)")[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (1 commits)")[![mfendeksilverstripe](https://avatars.githubusercontent.com/u/26395487?v=4)](https://github.com/mfendeksilverstripe "mfendeksilverstripe (1 commits)")[![michalkleiner](https://avatars.githubusercontent.com/u/233342?v=4)](https://github.com/michalkleiner "michalkleiner (1 commits)")[![NightJar](https://avatars.githubusercontent.com/u/778003?v=4)](https://github.com/NightJar "NightJar (1 commits)")[![raissanorth](https://avatars.githubusercontent.com/u/14869519?v=4)](https://github.com/raissanorth "raissanorth (1 commits)")[![sabina-talipova](https://avatars.githubusercontent.com/u/87288324?v=4)](https://github.com/sabina-talipova "sabina-talipova (1 commits)")

---

Tags

hacktoberfestvalidatormimesilverstripeuploadcwpfileinfo

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/silverstripe-mimevalidator/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripe-mimevalidator/health.svg)](https://phpackages.com/packages/silverstripe-mimevalidator)
```

###  Alternatives

[silverstripe/selectupload

Enables files to be uploaded into a user-designated folder

2779.1k1](/packages/silverstripe-selectupload)[davidpersson/mm

The PHP media library: media processing and MIME-Type/extension guessing.

2911.8k2](/packages/davidpersson-mm)[markguinn/silverstripe-email-helpers

Silverstripe extension containing SMTP mailer class and some other classes for HTML emails

3145.4k1](/packages/markguinn-silverstripe-email-helpers)[unclecheese/silverstripe-permamail

Adds database storage of emails and CMS definition of email templates.

2014.8k](/packages/unclecheese-silverstripe-permamail)[symbiote/silverstripe-notifications

Send CMS editable system notifications from code

155.8k3](/packages/symbiote-silverstripe-notifications)[camfindlay/apes

The Automated Provision of Email Services (APES) module will allow you to set up an automated sync mechanism between the SilverStripe Member DataObject and MailChimp.

122.6k](/packages/camfindlay-apes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
