Closed
Description
Description
Uploaded woff/woff2 return incorrect mime type.
The following code:
// $path is a content of an uploaded woff or woff2 file
$finfo = new \finfo(\FILEINFO_MIME_TYPE));
$mimeType = $finfo->file($path); // returns "application/octet-stream"
echo $mimeType;
Resulted in this output:
returns "application/octet-stream"
But I expected this output instead:
expected result is: "font/woff"
Mime type has been fixed in libmagic/file in version 5.42.
PHP Version
8.1.7
Operating System
Alpine 3.16