Joseph Morgan
14 Dec 2021
Laravel
Laravel storage keeps giving me 404 however the file is already there, what should I do? this is my first time working with the Storage class, here is an example of the code which I use
$img_name = time() . '1.' . $img1->getClientOriginalExtension();
Storage::disk('local')->put('/public/images/'.$img_name, $img);
$link = url('/').'/storage/images/'.$file_name;
The image was uploaded successfully but and I can see it in the Finder but what should I do to figure out this issue?
Thanks in advance
Hello Joseph, Can you please try to run this command as you mentioned this is the first time to use Storage in your app?
php artisan storage:link
let me know if this works with you, Good luck
Joseph Morgan
14 Dec 2021
Thank you so much, this works fine for me, I really missed this part while I am setting up the Storage
© 2023 Copyrights reserved for web-brackets.com