Remove reference to hardcoded media path
Replaces the reference to a hardcoded `/media` path when generating a local temp file path to utilize the folder name as set in `cms.storage.media.folder`.
This commit is contained in:
parent
65c3e4388b
commit
7a820f3c43
|
|
@ -6,6 +6,7 @@ use Lang;
|
|||
use File;
|
||||
use Form;
|
||||
use Input;
|
||||
use Config;
|
||||
use Request;
|
||||
use Response;
|
||||
use Exception;
|
||||
|
|
@ -872,7 +873,7 @@ class MediaManager extends WidgetBase
|
|||
{
|
||||
$fileName = md5($fileName.uniqid().microtime());
|
||||
|
||||
$path = temp_path() . '/media';
|
||||
$path = temp_path() . MediaLibrary::validatePath(Config::get('cms.storage.media.folder', 'media'), true);
|
||||
|
||||
if (!File::isDirectory($path)) {
|
||||
File::makeDirectory($path, 0777, true, true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue