mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-18 10:18:41 +00:00
log invaid upload permission/file
This commit is contained in:
parent
4ff9b1f93e
commit
d211936a37
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
|
|
@ -10,12 +11,13 @@
|
|||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Media\Models;
|
||||
|
||||
use phpOMS\System\File\FileUtils;
|
||||
use phpOMS\System\File\Local\Directory;
|
||||
use phpOMS\Log\FileLogger;
|
||||
|
||||
/**
|
||||
* Upload.
|
||||
|
|
@ -169,7 +171,11 @@ class UploadFile
|
|||
}
|
||||
|
||||
if (!\is_dir($path)) {
|
||||
Directory::create($path, 0755, true);
|
||||
$created = Directory::create($path, 0755, true);
|
||||
|
||||
if (!$created) {
|
||||
FileLogger::getInstance()->error('Couldn\t upload media file. There maybe is a problem with your permission or uploaded file.');
|
||||
}
|
||||
}
|
||||
|
||||
if (!\rename($f['tmp_name'], $dest = $path . '/' . $this->fileName)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user