Changeset 281
- Timestamp:
- Oct 16, 2014 10:22:23 AM (11 years ago)
- Location:
- pro-bachkim-filespace/sourcecode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-bachkim-filespace/sourcecode/api.violet.vn/www/apps/platform/modules/space/actions/actions.class.php
r280 r281 326 326 $this->aryNewTree = $aryNewTree; 327 327 } 328 329 public function executeSpaceupload() 330 { 331 332 $userId = $this->getRequestParameter('userid'); 333 334 $catId = $this->getRequestParameter('dir'); 335 336 if ($this->getRequest()->hasErrors()) return false; 337 if (!$this->getRequest()->hasFiles()) return true; 338 339 $file = reset($this->getRequest()->getFileNames()); 340 341 $fileName = $this->getRequest()->getFileName($file); 342 $fileType = $this->getRequest()->getFileType($file); 343 $fileSize = $this->getRequest()->getFileSize($file); 344 $fileError = $this->getRequest()->hasFileError($file); 345 $fileErrorNum = $this->getRequest()->getFileError($file); 346 if ($fileErrorNum || $fileError) return false; 347 348 $tempFile = violetUtil::getTempPath().$userId.'_'.$fileName; 349 350 $this->getRequest()->moveFile($file, $tempFile); 351 352 if ($this->getRequestParameter('unpack') == 'true') { 353 $tempPath = violetUtil::getTempPath($userId.'_'.date("YmdHis"), true); 354 myZip::Unzip($tempFile, $tempPath); 355 $this->MoveDirToSpace($tempPath, $catId, $userId); 356 unlink($tempFile); 357 } else { 358 $this->CreateSpaceFile($tempFile, $fileName, $fileSize, $catId, $userId); 359 } 360 361 echo '{"status":"success"}'; 362 return sfView::NONE; 363 } 328 364 329 public function executeUpload() { 365 330 //if (!$this->checkAuthentication()) return sfView::NONE; -
pro-bachkim-filespace/sourcecode/assets/js/manager.js
r280 r281 378 378 } else { 379 379 380 381 createFolder(treeCurrentNode, result); 380 o.oGrid.reloadGrid(); 381 alert("1"); 382 //createFolder(treeCurrentNode, result); 382 383 } 383 384 }
Note: See TracChangeset
for help on using the changeset viewer.