mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Recursive folder creation in Upload
This commit is contained in:
parent
bb6283740a
commit
68af8409a5
@ -127,11 +127,8 @@ class Upload extends Controller {
|
|||||||
$parentFolder = Folder::find_or_make($folderPath);
|
$parentFolder = Folder::find_or_make($folderPath);
|
||||||
|
|
||||||
// Create a folder for uploading.
|
// Create a folder for uploading.
|
||||||
if(!file_exists(ASSETS_PATH)){
|
|
||||||
mkdir(ASSETS_PATH, Config::inst()->get('Filesystem', 'folder_create_mask'));
|
|
||||||
}
|
|
||||||
if(!file_exists(ASSETS_PATH . "/" . $folderPath)){
|
if(!file_exists(ASSETS_PATH . "/" . $folderPath)){
|
||||||
mkdir(ASSETS_PATH . "/" . $folderPath, Config::inst()->get('Filesystem', 'folder_create_mask'));
|
Filesystem::makeFolder(ASSETS_PATH . "/" . $folderPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate default filename
|
// Generate default filename
|
||||||
|
Loading…
Reference in New Issue
Block a user