Skip to content
Advertisement

Laravel 8.38 validation issue, max file size. RuntimeException: The file {public path} cannot be opened. in file Psr17Factory.php on line 46

Created the file validation as (for test purpose it is 5kb)

'file': "max:5|mimes:jpg,png,jpeg,pdf,txt,doc,docx,mp4"

There is a weird issue, as it is displaying a valid error on uploading png

...may not be greater than 5 kilobytes.

but on uploading mp4 it is throwing following error

RuntimeException: The file {path-here}public cannot be opened. in file 
{path-here}vendornyholmpsr7srcFactoryPsr17Factory.php on line 46 

Advertisement

Answer

  1. Open icons tray on right side of your windows.
  2. left click on wamp icon.
  3. click on PHP > PHP Settings > upload_max_filesize = (set the size to max 256 MB).

You can also edit it in php.ini file in C:wamp64binapacheapache2.4.37binphp.ini click here for image

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement