CC-5709: Airtime Analyzer
* Some cleanup and refactoring for file deletion in the Media REST API * Fix the refresh timer on the Add Media page when there's pending imports.
This commit is contained in:
parent
6952902b22
commit
db2b52a1bf
5 changed files with 35 additions and 8 deletions
|
@ -198,8 +198,9 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
if ($file) {
|
||||
$con = Propel::getConnection();
|
||||
$storedFile = new Application_Model_StoredFile($file, $con);
|
||||
Application_Model_Preference::updateDiskUsage(-1 * abs(filesize($storedFile->getFilePath())));
|
||||
$storedFile->delete(); //TODO: This checks your session permissions... Make it work without a session?
|
||||
if ($storedFile->existsOnDisk()) {
|
||||
$storedFile->delete(); //TODO: This checks your session permissions... Make it work without a session?
|
||||
}
|
||||
$file->delete();
|
||||
$this->getResponse()
|
||||
->setHttpResponseCode(204);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue