fopen (C: \ lighttpd \ htdocs \ storage \ app \ upload / LqlmfPRYJovsfn6Snm5qF0GCQf2QBrdfhHmkiUWO.): failed to open stream: Permission denied

When I upload an image, everything is fine, but the exe file does not allow ..

<form action="{{ route('offers.add') }}" method="post" enctype="multipart/form-data"> <div class="form-group"> {{ csrf_field() }} <input type="file" id="file" name="file" > </div> </form> 

    1 answer 1

    I think you should pay attention to the forward and backward slashes, bring everything to the same form and use the built-in constant DIRECTORY_SEPARATOR if this path is going with your hands, well, make sure that this folder exists C:\lighttpd\htdocs\storage\app\upload

    • I also thought to slash, but where to change? folder exists - Mike Waters
    • Well, you need to look at the code, how do you transfer the file from the temporary folder? Request::file('file')->move($destinationPath, $name); like this? We must then look in $destinationPath - zippp
    • $ file-> store ('upload'); - Mike Waters
    • then it is probably added there automatically, try some other way to save a file on disk that allows you to specify a location - zippp
    • storeAs working - Mike Waters