CC-1799 Put Airtime Storage into a Human Readable File Naming Convention
delete is working, can upload from plupload.
This commit is contained in:
parent
8a15144dc8
commit
84dd5dac62
4 changed files with 73 additions and 80 deletions
|
@ -440,6 +440,19 @@ class ApiController extends Zend_Controller_Action
|
|||
$file->setMetadata($md);
|
||||
}
|
||||
}
|
||||
else if ($mode == "delete") {
|
||||
$filepath = $md['MDATA_KEY_FILEPATH'];
|
||||
$filepath = str_replace("\\", "", $filepath);
|
||||
$file = StoredFile::RecallByFilepath($filepath);
|
||||
|
||||
if (is_null($file)) {
|
||||
$this->view->error = "File doesn't exist in Airtime.";
|
||||
return;
|
||||
}
|
||||
else {
|
||||
$file->delete();
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->id = $file->getId();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue