CC-5709: Airtime Analyzer
* Bounce files with file extensions we don't support in MediaController * Added translation stuff for Recent Uploads
This commit is contained in:
parent
e4af3a5a0e
commit
1e62908e66
23 changed files with 52694 additions and 54641 deletions
|
@ -335,7 +335,15 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
|
||||
$tempFilePath = $_FILES['file']['tmp_name'];
|
||||
$tempFileName = basename($tempFilePath);
|
||||
|
||||
|
||||
//Only accept files with a file extension that we support.
|
||||
$fileExtension = pathinfo($originalFilename, PATHINFO_EXTENSION);
|
||||
if (!in_array(strtolower($fileExtension), explode(",", "ogg,mp3,oga,flac,wav,m4a,mp4,opus")))
|
||||
{
|
||||
@unlink($tempFilePath);
|
||||
throw new Exception("Bad file extension.");
|
||||
}
|
||||
|
||||
//TODO: Remove uploadFileAction from ApiController.php **IMPORTANT** - It's used by the recorder daemon...
|
||||
|
||||
$storDir = Application_Model_MusicDir::getStorDir();
|
||||
|
@ -346,7 +354,9 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
//and accessible by airtime_analyzer which could be running on a different machine.
|
||||
$newTempFilePath = Application_Model_StoredFile::copyFileToStor($tempFilePath, $originalFilename);
|
||||
} catch (Exception $e) {
|
||||
@unlink($tempFilePath);
|
||||
Logging::error($e->getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
Logging::info($newTempFilePath);
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
|
||||
<div id="recent_uploads_filter">
|
||||
<form>
|
||||
<input type="radio" name="upload_status" id="upload_status_all" checked></input><label for="upload_status_all">All</label>
|
||||
<input type="radio" name="upload_status" id="upload_status_failed"></input><label for="upload_status_failed">Failed</label>
|
||||
<input type="radio" name="upload_status" id="upload_status_pending"></input><label for="upload_status_pending">Pending</label>
|
||||
<input type="radio" name="upload_status" id="upload_status_all" checked></input><label for="upload_status_all"><?php echo _("All")?></label>
|
||||
<input type="radio" name="upload_status" id="upload_status_failed"></input><label for="upload_status_failed"><?php echo _("Failed")?></label>
|
||||
<input type="radio" name="upload_status" id="upload_status_pending"></input><label for="upload_status_pending"><?php echo _("Pending")?></label>
|
||||
</form>
|
||||
</div>
|
||||
<H2>Recent Uploads</H2>
|
||||
<H2><?php echo _("Recent Uploads")?></H2>
|
||||
<table id="recent_uploads_table" class="lib-content ui-widget ui-widget-content block-shadow alpha-block "></table>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue