Example #1
0
 public function AjaxFilesCreatePublicLink()
 {
     $oAccount = $this->getDefaultAccountFromParam();
     if (!$this->oApiCapability->isFilesSupported($oAccount)) {
         throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::FilesNotAllowed);
     }
     $sType = $this->getParamValue('Type');
     $sPath = $this->getParamValue('Path');
     $sName = $this->getParamValue('Name');
     $sSize = $this->getParamValue('Size');
     $bIsFolder = $this->getParamValue('IsFolder', '0') === '1' ? true : false;
     $mResult = $this->oApiFilestorage->createPublicLink($oAccount, $sType, $sPath, $sName, $sSize, $bIsFolder);
     return $this->DefaultResponse($oAccount, __FUNCTION__, $mResult);
 }