Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-05-23 13:45:35 +0400
committerThomas Müller <thomas.mueller@tmit.eu>2014-05-23 13:45:35 +0400
commit1eedab7f6ed696dc693bf9e363d9663460228eef (patch)
tree6dbd8c5ccf1aa4bf62b4cff9a0dd88a4d6c338cf /apps/files
parent6f29e1c67b94fb5732eb732c68eb116cc5d04b09 (diff)
php upload errors are written to log
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/ajax/upload.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index e72071e609d..07e39a883f7 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -79,7 +79,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];
+ \OCP\Util::writeLog('files', "Upload error: $error - $errorMessage", \OCP\Util::ERROR);
+ OCP\JSON::error(array('data' => array_merge(array('message' => $errorMessage), $storageStats)));
exit();
}
}