mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX File upload not working when open_basedir is set #5547
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114471 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
396f297acb
commit
5dbddba41b
@ -257,6 +257,7 @@ class Folder extends File {
|
|||||||
|
|
||||||
if (move_uploaded_file($tmpFile['tmp_name'], "$base/$file$ext")) {
|
if (move_uploaded_file($tmpFile['tmp_name'], "$base/$file$ext")) {
|
||||||
// Update with the new image
|
// Update with the new image
|
||||||
|
chmod("$base/$file$ext", Filesystem::$file_create_mask);
|
||||||
return $this->constructChild(basename($file . $ext));
|
return $this->constructChild(basename($file . $ext));
|
||||||
} else {
|
} else {
|
||||||
if(!file_exists($tmpFile['tmp_name'])) user_error("Folder::addUploadToFolder: '$tmpFile[tmp_name]' doesn't exist", E_USER_ERROR);
|
if(!file_exists($tmpFile['tmp_name'])) user_error("Folder::addUploadToFolder: '$tmpFile[tmp_name]' doesn't exist", E_USER_ERROR);
|
||||||
|
Loading…
Reference in New Issue
Block a user