proxyStorageBackend == null) { $this->proxyStorageBackend = new ProxyStorageBackend($this->getStorageBackend()); } return $this->proxyStorageBackend->getSignedURL($this->getResourceId()); } /** * * Returns a url to the file's object on Amazon S3. */ public function getAbsoluteFilePath() { if ($this->proxyStorageBackend == null) { $this->proxyStorageBackend = new ProxyStorageBackend($this->getStorageBackend()); } return $this->proxyStorageBackend->getAbsoluteFilePath($this->getResourceId()); } public function getFilename() { return $this->getDbFilepath(); } /** * Checks if the file is a regular file that can be previewed and downloaded. */ public function isValidPhysicalFile() { // We don't need to check if the cloud file is a valid file because // before it is imported the Analyzer runs it through Liquidsoap // to check its playability. If Liquidsoap can't play the file it // does not get imported into the Airtime library. return true; } /** * * Deletes the file from cloud storage */ public function deletePhysicalFile() { if ($this->proxyStorageBackend == null) { $this->proxyStorageBackend = new ProxyStorageBackend($this->getStorageBackend()); } $this->proxyStorageBackend->deletePhysicalFile($this->getResourceId()); } /** * * Deletes the cc_file and cloud_file entries from the database. */ public function delete(PropelPDO $con = NULL) { CcFilesQuery::create()->findPk($this->getCcFileId())->delete(); parent::delete(); } }