jaheller
3836
4
Laravel

download file from storage (get path)

Posted 3 years ago by jaheller

How to use the storage system to generate a file download?

Is there a function I can use to get the complete path of file or how to get this working? I would like to use the storage systems functions and not "hardcode" the mainpath into my app.

    $path = "app/storage/uploads/xy.zip";
        return response()->download($path);

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.