Asked by: Anna Jeanine
I am currently working on an upload and download functionality in my Laravel 5.4 application. I am having problems with getting the files from storage.
The upload functionality:
Storage::put('app/public/uploads/' . $filename, $file);
I have created a link between the public folder and storage php artisan storage:link
.
The download functionality:
Storage::get('app/public/uploads/' . $file->filename)
The folder in which the document is: /Users/anna/Sites/project/version2/storage/app/public/uploads/dkfjlasd.pdf
The error which I am getting now is: FileNotFoundException app/public/uploads/dkfjlasd.pdf.
Could someone please help me explain what the problem is? Because I am putting the file in the same place as where I am retrieving it from.
No comments:
Post a Comment