mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
MINOR Defaulting upload dir to /assets rather than /assets/Uploads in CMSFileAddController when viewing root folder
This commit is contained in:
parent
a30a615de4
commit
8fb2755c5b
@ -66,6 +66,8 @@ class CMSFileAddController extends LeftAndMain {
|
|||||||
// The Upload class expects a folder relative *within* assets/
|
// The Upload class expects a folder relative *within* assets/
|
||||||
$path = preg_replace('/^' . ASSETS_DIR . '\//', '', $folder->getFilename());
|
$path = preg_replace('/^' . ASSETS_DIR . '\//', '', $folder->getFilename());
|
||||||
$uploadField->setFolderName($path);
|
$uploadField->setFolderName($path);
|
||||||
|
} else {
|
||||||
|
$uploadField->setFolderName(ASSETS_DIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
$form = new Form(
|
$form = new Form(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user