diff --git a/filesystem/Upload.php b/filesystem/Upload.php index 7451dacd7..92050ea0a 100644 --- a/filesystem/Upload.php +++ b/filesystem/Upload.php @@ -145,10 +145,10 @@ class Upload extends Controller { * @param File $file * @return Boolean */ - public function loadIntoFile($tmpFile, $file) { + public function loadIntoFile($tmpFile, $file, $folderPath = false) { $this->file = $file; - return $this->load($tmpFile); + return $this->load($tmpFile, $folderPath); } /** diff --git a/forms/FileField.php b/forms/FileField.php index f8a0efa01..3a824ec1a 100755 --- a/forms/FileField.php +++ b/forms/FileField.php @@ -115,7 +115,7 @@ class FileField extends FormField { $this->upload->setAllowedExtensions($this->allowedExtensions); $this->upload->setAllowedMaxFileSize($this->allowedMaxFileSize); - $this->upload->loadIntoFile($_FILES[$this->name], $file); + $this->upload->loadIntoFile($_FILES[$this->name], $file, $this->folderName); if($this->upload->isError()) return false; $file = $this->upload->getFile();