From 05a8fdf09127ca6456ab0fb6ffaa1a9ebc7c28f8 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 18 Sep 2014 18:23:13 -0400 Subject: [PATCH] Removed disk quota check from image upload, updated doc for processUploadedImage function --- .../rest/controllers/ShowController.php | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/airtime_mvc/application/modules/rest/controllers/ShowController.php b/airtime_mvc/application/modules/rest/controllers/ShowController.php index 7ba49fb31..5293b07cb 100644 --- a/airtime_mvc/application/modules/rest/controllers/ShowController.php +++ b/airtime_mvc/application/modules/rest/controllers/ShowController.php @@ -70,13 +70,6 @@ class Rest_ShowController extends Zend_Rest_Controller return; } - if (Application_Model_Systemstatus::isDiskOverQuota()) { - $this->getResponse() - ->setHttpResponseCode(413) - ->appendBody("ERROR: Disk Quota reached."); - return; - } - try { $path = $this->processUploadedImage($showId, $_FILES["file"]["tmp_name"], $_FILES["file"]["name"]); } catch (Exception $e) { @@ -155,15 +148,17 @@ class Rest_ShowController extends Zend_Rest_Controller } /** - * Verify and process an uploaded image file, copying it first into .../stor/organize/ - * and then to RabbitMq to process. Processed image files end up in + * Verify and process an uploaded image file, copying it into * .../stor/imported/:owner-id/show-images/:show-id/ to differentiate between * individual users and shows * - * @param unknown $tempFilePath temporary filepath assigned to the upload - * generally of the form /tmp/:tmp_name - * @param unknown $originalFilename the file name at time of upload - * @throws Exception when a file with an unsupported file extension is uploaded + * @param unknown $tempFilePath + * - temporary filepath assigned to the upload generally of the form /tmp/:tmp_name + * @param unknown + * - $originalFilename the file name at time of upload + * @throws Exception + * - when a file with an unsupported file extension is uploaded or an + * error occurs in copyFileToStor */ private function processUploadedImage($showId, $tempFilePath, $originalFilename) {