owais
owais

Reputation: 4922

Laravel file storage link not found exception

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

Answers (1)

user1669496
user1669496

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

Related Questions