Support files with names like foo.0.1.3.ogg
This commit is contained in:
parent
65587be737
commit
b3528c314a
@ -108,9 +108,9 @@ function z_mime_content_type($filename) {
|
|||||||
'oth' => 'application/vnd.oasis.opendocument.text-web'
|
'oth' => 'application/vnd.oasis.opendocument.text-web'
|
||||||
);
|
);
|
||||||
|
|
||||||
$dot = strpos($filename, '.');
|
$last_dot = strrpos($filename, '.');
|
||||||
if ($dot !== false) {
|
if ($last_dot !== false) {
|
||||||
$ext = strtolower(substr($filename, $dot + 1));
|
$ext = strtolower(substr($filename, $last_dot + 1));
|
||||||
if (array_key_exists($ext, $mime_types)) {
|
if (array_key_exists($ext, $mime_types)) {
|
||||||
return $mime_types[$ext];
|
return $mime_types[$ext];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user