Merge pull request #8671 from owncloud/log-upload-errors

php upload errors are written to log
This commit is contained in:
Vincent Petry 2014-05-23 11:33:14 +02:00
commit 0b0e038b8b
1 changed files with 3 additions and 1 deletions

View 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();
}
}