silverstripe/mimevalidator

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

Installs: 90 714

Dependents: 5

Suggesters: 0

Security: 0

Stars: 8

Watchers: 16

Forks: 11

Open Issues: 1

Type:silverstripe-vendormodule

2.0.0 2018-01-26 00:41 UTC

This package is auto-updated.

Last update: 2020-05-20 03:24:07 UTC


README

Build Status Scrutinizer Code Quality codecov SilverStripe supported module

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.

Requirements

Note: For a SilverStripe 3.x compatible version, please use the 1.x release line.

Installation via Composer

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

Configuration

Read Allowed file types on the Silverstripe CMS documentation for details on configuring MIME type validation.