skip to Main Content

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


  1. Chosen as BEST ANSWER

    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.


  2. 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 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search