Fixes #1068
This commit is contained in:
parent
25f6170287
commit
cf1988eeca
|
|
@ -292,11 +292,12 @@ class FileUpload extends FormWidgetBase
|
|||
}
|
||||
|
||||
try {
|
||||
$uploadedFile = Input::file('file_data');
|
||||
if (!$uploadedFile) {
|
||||
if (!Input::hasFile('file_data')) {
|
||||
throw new ApplicationException('File missing from request');
|
||||
}
|
||||
|
||||
$uploadedFile = Input::file('file_data');
|
||||
|
||||
$validationRules = ['max:'.File::getMaxFilesize()];
|
||||
if ($fileTypes = $this->getAcceptedFileTypes()) {
|
||||
$validationRules[] = 'mimes:'.$fileTypes;
|
||||
|
|
|
|||
Loading…
Reference in New Issue