mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Use Rhymix Framework to decide whether a file can be directly downloaded
xpressengine/xe-core#1997
This commit is contained in:
parent
f17fa23598
commit
e1ffe39a2e
4 changed files with 41 additions and 2 deletions
|
|
@ -1055,7 +1055,7 @@ class fileController extends file
|
|||
$file_info = $file_list[$i];
|
||||
$old_file = $file_info->uploaded_filename;
|
||||
// Determine the file path by checking if the file is an image or other kinds
|
||||
if(preg_match("/\.(jpg|jpeg|gif|png|wmv|wma|mpg|mpeg|avi|swf|flv|mp1|mp2|mp3|mp4|asf|wav|asx|mid|midi|asf|mov|moov|qt|rm|ram|ra|rmm|m4v)$/i", $file_info->source_filename))
|
||||
if (Rhymix\Framework\Filters\FilenameFilter::isDirectDownload($file_info->source_filename))
|
||||
{
|
||||
$path = sprintf("./files/attach/images/%s/%s", $target_module_srl, getNumberingPath($target_srl, 3));
|
||||
$new_file = $path . $file_info->source_filename;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue