mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Ticket #4220 - Copying of uploaded files from temp to assets folder fails on IIS installs; simple patch fixes it
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85696 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5e3cffec1f
commit
844853ab10
@ -192,10 +192,7 @@ class Folder extends File {
|
||||
if($oldFile == $file && $i > 2) user_error("Couldn't fix $file with $i", E_USER_ERROR);
|
||||
}
|
||||
|
||||
//$fullFilename = "$base/$file";
|
||||
$fullFilename = $base . DIRECTORY_SEPARATOR . str_replace(array("\\","/") , DIRECTORY_SEPARATOR, $file );
|
||||
|
||||
if(file_exists($tmpFile['tmp_name']) && copy($tmpFile['tmp_name'], $fullFilename)) {
|
||||
if (move_uploaded_file($tmpFile['tmp_name'], "$base/$file")) {
|
||||
// Update with the new image
|
||||
return $this->constructChild(basename($file));
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user