Home > database >  laravel uploads images but doesn't show theme
laravel uploads images but doesn't show theme

Time:01-24

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?

CodePudding user response:

laravel stores images in public folder only and not store in nested folders, so instead of storing image in public images\folder1\folder2\image.png you can directly store public folder/image.png in this way

try to move file something like this

path= $actuFile->move(public_path('folder'), $name);

and retrieve something like this

(asset("folder/{$imagName}")

This is worked for me. if its work for you also then welcome in advance.

CodePudding user response:

I solved the problem. Php first uploads files to c:/windows/Temp then move them to laravel/public/uploadedFiles. I modified the permissions of the Temp folder and add IISUSER to the list. after that, I set full control permission to the IISUSER.

  • Related