Refs #1064 - Throw a nicer error here

This commit is contained in:
Samuel Georges 2015-04-12 19:58:28 +10:00
parent c96cef702c
commit 0a26827abd

View File

@ -293,6 +293,9 @@ class FileUpload extends FormWidgetBase
try {
$uploadedFile = Input::file('file_data');
if (!$uploadedFile) {
throw new ApplicationException('File missing from request');
}
$validationRules = ['max:'.File::getMaxFilesize()];
if ($fileTypes = $this->getAcceptedFileTypes()) {