mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Fix files with .jfif extension not being recognized as JPEG image
This commit is contained in:
parent
7058f9fa85
commit
df56b7f8b1
3 changed files with 3 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ class FilenameFilter
|
||||||
*/
|
*/
|
||||||
public static function isDirectDownload($filename, $include_multimedia = true)
|
public static function isDirectDownload($filename, $include_multimedia = true)
|
||||||
{
|
{
|
||||||
$images = 'gif|jpe?g|png|webp';
|
$images = 'gif|jpe?g|jfif|png|webp';
|
||||||
$audios = 'mp3|wav|ogg|flac|aac';
|
$audios = 'mp3|wav|ogg|flac|aac';
|
||||||
$videos = 'mp4|webm|ogv';
|
$videos = 'mp4|webm|ogv';
|
||||||
$legacy = 'avi|as[fx]|flv|m4[av]|midi?|mkv|moo?v|mpe?g|qt|r[am]m?|wm[av]';
|
$legacy = 'avi|as[fx]|flv|m4[av]|midi?|mkv|moo?v|mpe?g|qt|r[am]m?|wm[av]';
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@ class MIME
|
||||||
'jpg' => ['image/jpeg'],
|
'jpg' => ['image/jpeg'],
|
||||||
'jpeg' => ['image/jpeg'],
|
'jpeg' => ['image/jpeg'],
|
||||||
'jpe' => ['image/jpeg'],
|
'jpe' => ['image/jpeg'],
|
||||||
|
'jfif' => ['image/jpeg'],
|
||||||
'png' => ['image/png'],
|
'png' => ['image/png'],
|
||||||
'webp' => ['image/webp'],
|
'webp' => ['image/webp'],
|
||||||
'svg' => ['image/svg+xml'],
|
'svg' => ['image/svg+xml'],
|
||||||
|
|
|
||||||
|
|
@ -820,7 +820,7 @@ class fileController extends file
|
||||||
if(!$manual_insert)
|
if(!$manual_insert)
|
||||||
{
|
{
|
||||||
// image
|
// image
|
||||||
if(in_array($file_info['extension'], ['gif', 'jpg', 'jpeg', 'png', 'webp', 'bmp']))
|
if(in_array($file_info['extension'], ['gif', 'jpg', 'jpeg', 'jfif', 'png', 'webp', 'bmp']))
|
||||||
{
|
{
|
||||||
$file_info = $this->adjustUploadedImage($file_info, $config);
|
$file_info = $this->adjustUploadedImage($file_info, $config);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue