Closed jpuck closed 6 years ago
Now it's easy enough to check if an extension matches a media subtype
$extension = 'mp4'; if ( $mimes->getMimeType($extension) === 'video/mp4' ) { // ... }
Would you consider a PR to extend support for asserting media supertypes?
e.g.
$extensions = [ 'mp4', 'avi', 'mkv', ]; foreach ( $extensions as $extension ) { if ( $mimes->isMediaType('video', $extension) ) { // returns true } }
I understand that this is encroaching on the fringes of this lib's scope, but because it's such a standard use case, I was curious if you'd be open to it?
thanks
Yes, I would consider this out of scope, this only aims to provide a simple mapping between MIME type and extension :)
Now it's easy enough to check if an extension matches a media subtype
Would you consider a PR to extend support for asserting media supertypes?
e.g.
I understand that this is encroaching on the fringes of this lib's scope, but because it's such a standard use case, I was curious if you'd be open to it?
thanks