protected function saveUploadedFile() { $file = parent::saveUploadedFile(); $file = str_replace('../' . Gpf_Paths::getInstance()->getAccountDirectoryRelativePath(), Gpf_Paths::getInstance()->getFullAccountServerUrl(), $file); return $file; }
/** * Upload file to server * * @param Gpf_Rpc_Params $params * @service db_file write * @return Gpf_Rpc_Form */ public function upload(Gpf_Rpc_Params $params) { $cacheExportDirectory = Gpf_Paths::CACHE_DIRECTORY . Gpf_Csv_ImportExportService::EXPORT_DIRECTORY; $this->clearTempDirectory(Gpf_Paths::getInstance()->getAccountDirectoryPath() . $cacheExportDirectory); $this->setRelativeUploadPath(Gpf_Paths::getInstance()->getAccountDirectoryRelativePath() . $cacheExportDirectory); $form = parent::upload($params); $form->setField("filename", Gpf_Paths::getInstance()->getFullAccountServerUrl() . $cacheExportDirectory . $this->getName()); $form->setField("fileid", Gpf_Paths::getInstance()->getAccountPath() . $cacheExportDirectory . $this->getName()); $form->setField("filesize", $this->size); $form->setField("filetype", $this->type); return $form; }
protected function generateFileName($count){ return parent::generateFileName($count). self::TMP_EXT; }
public function __construct() { parent::__construct(); $this->setAllowedFileExtensions(array('ico')); $this->setRelativeUploadPath(Gpf_Paths::getInstance()->getAccountDirectoryRelativePath() . Gpf_Paths::FILES_DIRECTORY); }
public function __construct() { parent::__construct(); $this->setAllowedFileExtensions(array('zip')); }