vendredi 10 décembre 2021

Laravel Storage File not downloading (File not found)

in my laravel project i have uploads folder from where i am trying to download file.

Folder Hierarchy:

-Project
--Public
---Storage (created using php artisan storage:link)
----uploads
-----file.jpg ( i am trying to download)

Controller:

public function getdata(Request $request)
    {
        return Storage::download('/storage/uploads'.$image_name);
    //image name is file.jpg
      }

Error:

File not found at path: storage/uploads["file.jpg"]


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire