I designed a web app by Laravel and deployed it on IIS windows server 2022.
this app uploads images correctly but it can’t show them.
when I open the security tab on properties of uploaded images I see IISUSER doesn’t exist in the permissions list. I change the permission list and add IISUSER to it and everything is ok. what should I do to resolve it?
2
Answers
I solved the problem. Php first uploads files to
c:/windows/Temp
then move them tolaravel/public/uploadedFiles
. I modified the permissions of theTemp
folder and addIISUSER
to the list. after that, I set full control permission to theIISUSER
.laravel stores images in public folder only and not store in nested folders, so instead of storing image in public
imagesfolder1folder2image.png
you can directly store publicfolder/image.png
in this waytry to move file something like this
and retrieve something like this
This is worked for me.
if its work for you also then welcome in advance.