FIX fileexists check via ajax didnt know what folder the file was being uploaded to. Fixes #950

This commit is contained in:
sheadawson 2014-02-20 15:17:04 +11:00
parent 118776672a
commit dc865399dc

View File

@ -57,6 +57,10 @@ class CMSFileAddController extends LeftAndMain {
Requirements::javascript(FRAMEWORK_DIR . '/javascript/AssetUploadField.js');
Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
if($currentPageID = $this->currentPageID()){
Session::set("{$this->class}.currentPage", $currentPageID);
}
$folder = $this->currentPage();
$uploadField = UploadField::create('AssetUploadField', '');