image/png png
image/svg+xml image/svg svg
image/tiff tiff tif
-image/vnd.djvu djvu
+image/vnd.djvu image/x.djvu image/x-djvu djvu
image/x-portable-pixmap ppm
text/plain txt
text/html html htm
$mime = $this->detectMimeType( $file, $ext );
// Read a chunk of the file
+ wfSuppressWarnings();
$f = fopen( $file, "rt" );
+ wfRestoreWarnings();
if( !$f ) return "unknown/unknown";
$head = fread( $f, 1024 );
fclose( $f );