Added option to detect file type based on header bytes

This commit is contained in:
Matthew Barbour
2019-06-12 17:35:11 -05:00
parent 8f73b35fbb
commit 97abeb5254
6 changed files with 55 additions and 23 deletions

View File

@@ -310,7 +310,7 @@ function getMimeType(string $file, string $ext=""): string
return 'application/octet-stream';
}
function getExtension(?string $mime_type): ?string
function get_extension(?string $mime_type): ?string
{
if (empty($mime_type)) {
return null;