F
Filament12mo ago
ghc

File display issue

I used a FileUpload and RichEditor to upload files of different types. I am sure that they can be uploaded normally. However, when I try to download them, it will show 404 and the image cannot be seen. The situation can be seen in the image. If you need more information, please tell me what information you need.
15 Replies
ghc
ghc12mo ago
ghc
ghc12mo ago
I am trying to download a PDF file from your website, but I am getting a 404 error. Is it possible that the path to the file is incorrect?
ghc
ghc12mo ago
when i down this png
Tin
Tin12mo ago
Did you run storage:link artisan command command?
ghc
ghc12mo ago
i didn't you mean "php artisan storage:link" ?
Tin
Tin12mo ago
Yes
ghc
ghc12mo ago
I haven't run the php artisan storage:link command, but I got the error "The [C:\xampp\htdocs\vms3\public\storage] link already exists". I think I should delete the storage folder and run the command again?
Dennis Koch
Dennis Koch12mo ago
Is public/storage a folder or symlink? Try deleting public/storage and run that command again. Not sure how that works under Windows.
ghc
ghc12mo ago
but my file not in public/storage
ghc
ghc12mo ago
Dennis Koch
Dennis Koch12mo ago
That's right. It should be in storage/app/public. But public/storage should be symlinked to that folder
ghc
ghc12mo ago
you mean this file need to symlinked storage\app\public ?
Dennis Koch
Dennis Koch12mo ago
I think this is a symlink on Windows but I am not sure. Sorry.
ghc
ghc12mo ago
you are right
Dennis Koch
Dennis Koch12mo ago
Make sure they properly work with XAMPP