getFullFilePath(); if(file_exists($fullFilePath) && is_file($fullFilePath)) { header('Cache-control: private'); header('Content-Type: application/octet-stream'); header('Content-Length: '.filesize($fullFilePath)); header('Content-Disposition: filename='. $this->getFileName()); flush(); $file = fopen($fullFilePath, 'r'); print fread($file, filesize($fullFilePath)); fclose($file); return true; } else { return false; } } public function eraseFile() { unlink($this->getLocalPath() . $this->getFileName()); } }