summaryrefslogtreecommitdiffstats
path: root/application/controllers/file.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-03 00:23:12 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-03 00:23:12 +0100
commitcb52a4cdc2daa45a61c728f5ec83603e6c6a71fa (patch)
tree0470c7a3d39c41f6b2b87af8fc8700ad849e14cf /application/controllers/file.php
parent33efe571e3e7ebd607e92345c2e94e7fd8ae27f0 (diff)
Rework error handling in upload validator
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/file.php')
-rw-r--r--application/controllers/file.php14
1 files changed, 1 insertions, 13 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 5fce8afc8..e35978a1e 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -897,19 +897,7 @@ class File extends MY_Controller {
$files = getNormalizedFILES();
- if (empty($files)) {
- show_error("No file was uploaded or unknown error occured.");
- }
-
- $errors = service\files::verify_uploaded_files($files);
- if (!empty($errors)) {
- $messages = array();
- foreach ($errors as $error) {
- $messages[] = htmlspecialchars($error["filename"]).": ".$error["message"];
- }
- show_error("Error(s) occured while uploading:<br>".implode("<br>", $messages), 400);
- }
-
+ service\files::verify_uploaded_files($files);
$limits = $this->muser->get_upload_id_limits();
foreach ($files as $key => $file) {