cchacholiades cchacholiades - 5 months ago 71
PHP Question

Laravel file does not exist - file upload

I am using a form to upload video files. For some reason all I get is the following error:

Symfony \ Component \ HttpFoundation \ File \ Exception \ FileNotFoundException
The file "" does not exist


In my controller I had a validation rule to require files, like so

$validator = Validator::make(Input::all(),
array(
'file' => 'required'
)
);


But because of the above rule, I couldn't properly debug what is going on, therefore I ended up removing it, as a result to generate the above error.

Answer

In the php.ini file, change the following:

upload_max_filesize = 20M
post_max_size = 20M

This should make it work.

Comments