mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-12 06:52:12 +09:00
Use proper file storage path for skin uploads
This commit is contained in:
parent
6a9a884680
commit
930ebc97b7
2 changed files with 20 additions and 10 deletions
|
|
@ -454,11 +454,11 @@ class moduleAdminController extends module
|
|||
continue;
|
||||
}
|
||||
// Upload the file to a path
|
||||
$path = sprintf("./files/attach/images/%s/", $module_srl);
|
||||
$oFileController = getController('file');
|
||||
$path = $oFileController->getStoragePath('images', getNextSequence(), $module_srl, 0, '', false);
|
||||
// Create a directory
|
||||
if(!FileHandler::makeDir($path)) return false;
|
||||
|
||||
$filename = $path.$image_obj['name'];
|
||||
$filename = $path . Rhymix\Framework\Filters\FilenameFilter::clean($image_obj['name']);
|
||||
// Move the file
|
||||
if(!move_uploaded_file($image_obj['tmp_name'], $filename))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue