WireUpload::hasValidMimeType()
Does given file extension have a valid mime type?
Available since version 3.0.258.
Usage
// basic usage
$bool = $wireUpload->hasValidMimeType(string $filename);
// usage with all arguments
$bool = $wireUpload->hasValidMimeType(string $filename, array $mimeTypes = []);Arguments
| Name | Type(s) | Description |
|---|---|---|
$filename | string | |
$mimeTypes (optional) | array | Optionally specify [ 'ext' => 'type', 'ext' => [ 'type1', 'type2' ] If argument omitted then $config->fileContentTypes is used. |
Return value
bool
WireUpload methods and properties
API reference based on ProcessWire core version 3.0.257