Merge pull request #1939 from chillu/pulls/folder-creation

Recursive folder creation in Upload
This commit is contained in:
Will Rossiter 2013-05-14 02:00:06 -07:00
commit cf31114813

View File

@ -127,11 +127,8 @@ class Upload extends Controller {
$parentFolder = Folder::find_or_make($folderPath);
// 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)){
mkdir(ASSETS_PATH . "/" . $folderPath, Config::inst()->get('Filesystem', 'folder_create_mask'));
Filesystem::makeFolder(ASSETS_PATH . "/" . $folderPath);
}
// Generate default filename