mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
기존에 direct download가 허용되던 타입을 복원하되, 레거시 타입은 별도 표기
This commit is contained in:
parent
4bb380cfa8
commit
9163bc24e9
1 changed files with 6 additions and 1 deletions
|
|
@ -97,7 +97,12 @@ class FilenameFilter
|
|||
*/
|
||||
public static function isDirectDownload($filename)
|
||||
{
|
||||
if (preg_match('/\.(gif|jpe?g|png|webp|mp3|wav|ogg|flac|aac|mp4|webm|ogv)$/i', $filename))
|
||||
$images = 'gif|jpe?g|png|webp';
|
||||
$audios = 'mp3|wav|ogg|flac|aac';
|
||||
$videos = 'mp4|webm|ogv';
|
||||
$legacy = 'avi|as[fx]|flv|m4[av]|midi?|mkv|moo?v|mpe?g|qt|r[am]m?|wm[av]';
|
||||
|
||||
if (preg_match(sprintf('/\.(?:%s|%s|%s|%s)$/i', $images, $audios, $videos, $legacy), $filename))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue