how i can show my *.pdf files from storage/? - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Monday, September 25, 2023

how i can show my *.pdf files from storage/?

I have a project with Laravel & Livewire, in a component i save a *.pdf on app/storage/public/documents/*MiFiles.pdf, save the path in field of my database ($document->content), when i apply Storage::Exist($document->content) laravel return True, and I can download file from this path saved, but try show this content on a iframe, and laravel show me 404 file not found. My project runs on a local machine (127:0.0.0) and apply the asset to <iframe src=></iframe>but it does not show the file.

I ran 'php artisan storage:link' and my fileSystem.php file is configured to

default' => env('FILESYSTEM_DISK', 'public')

and .env file has FILESYSTEM_DISK variable set to public as well

the links has: 'links' => [ public_path('storage') => storage_path('app/public') ],

But not laravel found file ¿how i can solve this?



source https://stackoverflow.com/questions/77168434/how-i-can-show-my-pdf-files-from-storage

No comments:

Post a Comment