Removed disk quota check from image upload, updated doc for processUploadedImage function
This commit is contained in:
parent
be90839dbe
commit
05a8fdf091
|
@ -70,13 +70,6 @@ class Rest_ShowController extends Zend_Rest_Controller
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Application_Model_Systemstatus::isDiskOverQuota()) {
|
|
||||||
$this->getResponse()
|
|
||||||
->setHttpResponseCode(413)
|
|
||||||
->appendBody("ERROR: Disk Quota reached.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$path = $this->processUploadedImage($showId, $_FILES["file"]["tmp_name"], $_FILES["file"]["name"]);
|
$path = $this->processUploadedImage($showId, $_FILES["file"]["tmp_name"], $_FILES["file"]["name"]);
|
||||||
} catch (Exception $e) {
|
} 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/
|
* Verify and process an uploaded image file, copying it into
|
||||||
* and then to RabbitMq to process. Processed image files end up in
|
|
||||||
* .../stor/imported/:owner-id/show-images/:show-id/ to differentiate between
|
* .../stor/imported/:owner-id/show-images/:show-id/ to differentiate between
|
||||||
* individual users and shows
|
* individual users and shows
|
||||||
*
|
*
|
||||||
* @param unknown $tempFilePath temporary filepath assigned to the upload
|
* @param unknown $tempFilePath
|
||||||
* generally of the form /tmp/:tmp_name
|
* - temporary filepath assigned to the upload generally of the form /tmp/:tmp_name
|
||||||
* @param unknown $originalFilename the file name at time of upload
|
* @param unknown
|
||||||
* @throws Exception when a file with an unsupported file extension is uploaded
|
* - $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)
|
private function processUploadedImage($showId, $tempFilePath, $originalFilename)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue