lse123
2 months ago
605
13
General

how users can download a file jpg in Laravel 7.x or 6.x

Posted 2 months ago by lse123

how users can download a file jpg in Laravel 7.x or 6.x

https://laravel.com/docs/7.x/filesystem#downloading-files

Route::get('users', function () {
    return Storage::download('http://homestead.test/images/2568346.jpg');
});

http://homestead.test/images/2568346.jpg // this in-browser appears an image and located at

F:\htdocs_xampp\Laravel\code\project1\public\images\2568346.jpg

getting http://homestead.test/dashboard/users >>>>>

League\Flysystem\FileNotFoundException File not found at path: http:/homestead.test/images/2568346.jpg http://homestead.test/dashboard/users ... ...

Please sign in or create an account to participate in this conversation.