Fix #1207 enable option to control whether audio/video files are downloaded directly or through procFileDownload

This commit is contained in:
Kijin Sung 2020-03-23 02:09:25 +09:00
parent 7633bc7b3a
commit 66a6834204
5 changed files with 23 additions and 2 deletions

View file

@ -955,7 +955,15 @@ class fileController extends file
{
$storage_path = $this->getStoragePath('binaries', $args->file_srl, $module_srl, $upload_target_srl, $args->regdate);
}
$args->direct_download = $direct ? 'Y' : 'N';
if($config->allow_multimedia_direct_download !== 'N')
{
$args->direct_download = $direct ? 'Y' : 'N';
}
else
{
$args->direct_download = Rhymix\Framework\Filters\FilenameFilter::isDirectDownload($args->source_filename, false) ? 'Y' : 'N';
}
// Create a directory
if(!Rhymix\Framework\Storage::isDirectory($storage_path) && !Rhymix\Framework\Storage::createDirectory($storage_path))