/** * Delete a file, if it exists, with the specified field name. * * @param $field_name */ protected function _deleteFile($field_name) { if ($this->{$field_name}) { $value = $this->{$field_name}; \PVL\Service\AmazonS3::delete($value); } }
public function cleanupAction() { $s3_path = 'db_dumps/pvlive_import.sql'; \PVL\Service\AmazonS3::delete($s3_path); return $this->returnSuccess('DB Import dump file deleted.'); }