mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
php upload errors are written to log
This commit is contained in:
parent
4f0370f1da
commit
201cc59fe0
1 changed files with 3 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue