/** * send file * * @access public */ public function sendFileObject() { $file = new ilSessionFile((int) $_GET['file_id']); ilUtil::deliverFile($file->getAbsolutePath(), $file->getFileName(), $file->getFileType()); return true; }
/** * Clone files * * @access public * @param int new event_id * */ public function cloneFiles($a_target_event_id) { $file = new ilSessionFile(); $file->setSessionId($a_target_event_id); $file->setFileName($this->getFileName()); $file->setFileType($this->getFileType()); $file->setFileSize($this->getFileSize()); $file->create(false); // Copy file $source = new ilFSStorageSession($this->getSessionId()); $source->copyFile($this->getAbsolutePath(), $file->getAbsolutePath()); }