summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/item_rest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gallery/helpers/item_rest.php b/modules/gallery/helpers/item_rest.php
index 298c2f4a..ec86ce93 100644
--- a/modules/gallery/helpers/item_rest.php
+++ b/modules/gallery/helpers/item_rest.php
@@ -160,6 +160,9 @@ class item_rest_Core {
case "photo":
case "movie":
+ if (empty($request->file)) {
+ throw new Rest_Exception("Bad Request: Upload failed", 400);
+ }
$item->type = $entity->type;
$item->parent_id = $parent->id;
$item->set_data_file($request->file);