]> source.dussan.org Git - nextcloud-server.git/commitdiff
php upload errors are written to log
authorThomas Müller <thomas.mueller@tmit.eu>
Thu, 22 May 2014 10:20:27 +0000 (12:20 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Thu, 22 May 2014 10:20:27 +0000 (12:20 +0200)
apps/files/ajax/upload.php

index a5ce7b257da3db8de85ac94fc19f95b500b0d29c..9750173d1107f587f0329c6197398f9cdccd071b 100644 (file)
@@ -88,7 +88,9 @@ foreach ($_FILES['files']['error'] as $error) {
                        UPLOAD_ERR_NO_TMP_DIR => $l->t('Missing a temporary folder'),
                        UPLOAD_ERR_CANT_WRITE => $l->t('Failed to write to disk'),
                );
-               OCP\JSON::error(array('data' => array_merge(array('message' => $errors[$error]), $storageStats)));
+               $errorMessage = $errors[$error];
+               \OC::$server->getLogger()->alert("Upload error: $error - $errorMessage", array('app' => 'files'));
+               OCP\JSON::error(array('data' => array_merge(array('message' => $errorMessage), $storageStats)));
                exit();
        }
 }