Reputation: 4922
Using Laravel 5.4. it's giving me an error of
NotFoundHttpException in RouteCollection.php line 161:
I'm uploading files under storage directory. I can see files in project-root/storage/app/files
Also I have created symlink using php artisan storage:link
. When I visit the generated link (http://example.com/storage/files/RcDPA5N6FpTWCnnh2w8bQO85id53oAiCeZgITpwB.png)
though, it gives me not found exception.
Also I'm wondering if I'm referring resource then why route is being called.
Upvotes: 2
Views: 7928
Reputation: 33058
That command will generate a symlink to app/storage/public
so the files would need to go in app/storage/public/files
and then they should be accessible via http://example.com/storage/files/RcDPA5N6FpTWCnnh2w8bQO85id53oAiCeZgITpwB.png.
Upvotes: 2