CC-5888: Handle file deletion if the file is stored in the cloud
Execute a python script that deletes a file from the cloud
This commit is contained in:
parent
8c2754972e
commit
dd37ffbdd7
7 changed files with 81 additions and 44 deletions
|
@ -101,7 +101,12 @@ class CcFiles extends BaseCcFiles {
|
|||
|
||||
public function deletePhysicalFile()
|
||||
{
|
||||
unlink($this->getAbsoluteFilePath());
|
||||
$filepath = $this->getAbsoluteFilePath();
|
||||
if (file_exists($filepath)) {
|
||||
unlink($filepath);
|
||||
} else {
|
||||
throw new Exception("Could not locate file ".$filepath);
|
||||
}
|
||||
}
|
||||
|
||||
} // CcFiles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue