Skip to content

Instantly share code, notes, and snippets.

View anxp's full-sized avatar

Andrii anxp

View GitHub Profile
@anxp
anxp / missed_drupal_mime_validation.php
Last active January 13, 2019 13:57
Drupal 7 MIME type missed validation function
<?php
/**
* Checks that the file has allowed MIME type.
*
* @param $file
* A Drupal file object.
* @param $mimetypes_string
* A string with a space separated list of allowed MIME types.
*
* @return