CC-5888: Handle file deletion if the file is stored in the cloud
This commit is contained in:
parent
aaee522ec6
commit
7ca6b91cdf
4 changed files with 17 additions and 17 deletions
|
@ -330,10 +330,12 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
|
||||
$requestData = json_decode($this->getRequest()->getRawBody(), true);
|
||||
|
||||
$con = Propel::getConnection();
|
||||
$storedFile = new Application_Model_StoredFile(CcFilesQuery::create()->findPk($id), $con);
|
||||
|
||||
$storedFile->doFileDeletionCleanup($requestData["filesize"]);
|
||||
if ($requestData["import_status"] == 1) {
|
||||
$con = Propel::getConnection();
|
||||
$storedFile = new Application_Model_StoredFile(CcFilesQuery::create()->findPk($id), $con);
|
||||
|
||||
$storedFile->doFileDeletionCleanup($requestData["filesize"]);
|
||||
}
|
||||
}
|
||||
|
||||
private function getId()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue