Skip to content
Advertisement

Laravel 5.4 fopen(): Filename cannot be empty

I want to upload image in laravel 5.4 Here’s the code:

JavaScript

in FilesystemAdapter.php (line 146)

I checked the FileSystemAdapter.php and saw that the problem is in this line:

JavaScript

When I var dump the $file variable it returns the correct info, but when I var_dump($file->getRealPath(); it says bool(false) and I can’t upload the image

Advertisement

Answer

We had this problem with Internet Information Services (IIS) for Windows® Server. And only thing needed was – permission for C:Windowstemp because it is set as upload_tmp_dir in php.ini for php7.

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