mirror of
https://github.com/aoaostar/toolbox.git
synced 2025-12-25 22:12:54 +00:00
fix: 🐛 svg文件content-type补充
This commit is contained in:
parent
c64a182ee6
commit
d207b7e65d
@ -449,12 +449,14 @@ if (!function_exists('get_content_type')) {
|
||||
case 'js':
|
||||
$mime_type = 'application/javascript';
|
||||
break;
|
||||
case 'svg':
|
||||
$mime_type = 'image/svg+xml';
|
||||
break;
|
||||
default:
|
||||
$f_open = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$mime_type = finfo_file($f_open, $filename);
|
||||
finfo_close($f_open);
|
||||
}
|
||||
|
||||
return $mime_type;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user