Did you try simply rebooting? Or restarting your server (vagrant?)
file does not exist or is not readable
I have 2 fields to upload zip file and image .
When I upload both files I get this error :
The "php805B.tmp" file does not exist or is not readable.
if ($request->hasFile('rfile')) {
$file = $request->file('rfile');
$file_name = time() . '.' . $file->getClientOriginalExtension();
$destinationPath = public_path('/files/support/');
$file->move($destinationPath, $file_name);
$model->file = $file_name;
}
if ($request->hasFile('pic')) {
$image = $request->file('pic');
$name_image = time() . '.' . $image->getClientOriginalExtension();
$destinationPath = public_path('/images/');
$image->move($destinationPath, $name_image);
$model->pic = $name_image;
}
the rfile isn't large it's about 50kb so I do not upload large files.
the weird thing that this code was working. suddenly it stopped I Didn't change anything in the controller.
I have enctype="multipart/form-data" on my form.
any idea what's wrong here?
Also use the browsers developer tools to see what's going on.
Also do a
dd($file);
first if then second if and see if that's working.
Perhaps also at the beginning of that controller method just echo something to see if you are hitting the controller:
echo "hello";
If it was working, perhaps a small change some where caused this. Have you changed anything in config or the .env file.
Please or to participate in this conversation.