mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
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…
x
Reference in New Issue
Block a user