| 2376 | if( ( $mime === 'application/octet-stream' || $mime === false ) && function_exists ( 'finfo_file' ) ){ |
| 2377 | /* if the mime type is false or octet stream, its possible we are dealing with an image file not supported by PHP |
| 2378 | Constants (this applies at least to svg, but might apply to other file types) |
| 2379 | To fix this, use finfo to determine the mimetype instead |
| 2380 | */ |
| 2381 | $finfo = finfo_open( FILEINFO_MIME_TYPE ); |
| 2382 | $mime = finfo_file( $finfo, $file ); |
| 2383 | finfo_close( $finfo ); |
| 2384 | } |