Laravel 5.4 fopen(): Filename cannot be empty
We had this problem with Internet Information Services (IIS) for Windows® Server. And only thing needed was - permission for C:\Windows\temp
because it is set as upload_tmp_dir
in php.ini
for php7.
My case with Laragon 4.0.12 on Windows 10.
The problem was that upload_tmp_dir=... in my php.ini had not set needed permissions.
If this setting is commented the value should be the default windows temp directory (C:\Windows\Temp you can check your permissions for it).
The solution - I changed it to:
upload_tmp_dir = "C:\Users\{my_user}\AppData\Local\Temp"
in order to avoid messing up with changing permissions.
Restart the server after the change to take effect.
Another settings in php.ini to consider:
upload_max_filesize =
max_file_uploads =
Also following php extensions are needed to be enabled: exif, gd2