Add option to exclude multimedia files from direct download #1207

This commit is contained in:
Kijin Sung 2020-03-23 01:52:57 +09:00
parent b8665d73cb
commit 7633bc7b3a
2 changed files with 12 additions and 4 deletions

View file

@ -91,5 +91,10 @@ class FilenameFilterTest extends \Codeception\TestCase\Test
$this->assertFalse(FilenameFilter::isDirectDownload(''));
$this->assertFalse(FilenameFilter::isDirectDownload('http://www.google.com'));
$this->assertFalse(FilenameFilter::isDirectDownload('/'));
$this->assertTrue(FilenameFilter::isDirectDownload('foobar.jpg', false));
$this->assertTrue(FilenameFilter::isDirectDownload('foobar.webp', false));
$this->assertFalse(FilenameFilter::isDirectDownload('foobar.mp4', false));
$this->assertFalse(FilenameFilter::isDirectDownload('foobar.webm', false));
}
}