This commit is contained in:
Samuel Georges 2015-04-13 21:51:22 +10:00
parent 25f6170287
commit cf1988eeca

View File

@ -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;