diff --git a/tinyfilemanager.php b/tinyfilemanager.php index bb35f1c..d0fe6db 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -2945,6 +2945,10 @@ function fm_get_file_mimes($extension) $fileTypes['php'] = ['application/x-php']; $fileTypes['html'] = ['text/html']; $fileTypes['txt'] = ['text/plain']; + //Unknown mime-types should be 'application/octet-stream' + if(empty($fileTypes[$extension])) { + $fileTypes[$extension] = ['application/octet-stream']; + } return $fileTypes[$extension]; }