C
C
colbaster2020-05-04 14:40:53
Laravel
colbaster, 2020-05-04 14:40:53

Why does it give a file with 0 size for laravel download?

I'm trying to download a file, it sends it for download with the correct name and permission but with 0 size.

Link to download

<a href="{{route('download', $material->link)}}" download>Завантажити</a>

Controller
public function download($path){
        return response()->download(public_path($path));
    }


Maybe the reason is that I'm doing this on a local server?
Tell me what I'm doing wrong.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question