download file from storage (get path)

Posted 2 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/";
        return response()->download($path);

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.