BUG Better upload error message

Fixes https://github.com/silverstripe/silverstripe-asset-admin/issues/720
This commit is contained in:
Damian Mooyman 2018-01-23 16:08:42 +13:00
parent 7603c6d798
commit b44273d1d6
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -294,7 +294,8 @@ trait FileUploadReceiver
} }
if ($tmpFile['error']) { if ($tmpFile['error']) {
$error = $tmpFile['error']; $this->getUpload()->validate($tmpFile);
$error = implode(' ' . PHP_EOL, $this->getUpload()->getErrors());
return null; return null;
} }