filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
18.09k stars 2.83k forks source link

file upload not display image when field is full url #7669

Closed febelery closed 1 year ago

febelery commented 1 year ago

Package

filament/filament

Package Version

3

Laravel Version

10

Livewire Version

3

PHP Version

8.2

Problem description

image url is xxxxxxxx.png show but http://localhost/storage/xxxxxxxx.png not show

Expected behavior

http://localhost/storage/xxxxxxxx.png show

Steps to reproduce

 Forms\Components\FileUpload::make('title')
                        ->image()
                        ->openable()
                        ->imageEditor()
                        ->downloadable()
                        ->imageEditorEmptyFillColor('#000000')
                        ->imageEditorAspectRatios([
                            '16:9',
                            '4:3',
                            '1:1',
                        ])

Reproduction repository

https://github.com/filamentphp/filament

Relevant log output

No response

thethunderturner commented 1 year ago

I think you missed some steps. Try the following: 1) Go to the .env file and add the port :8000 (or whatever port you are using) to the APP URL 2) Type php artisan storage:link

Then it should work:)

febelery commented 1 year ago

I think you missed some steps. Try the following:

  1. Go to the .env file and add the port :8000 (or whatever port you are using) to the APP URL
  2. Type php artisan storage:link

Then it should work:)

I know php artisan storage:link. I need http://localhost/storage/xxxxxxxx.png can show when field is Forms\Components\FileUpload. http://localhost/storage/xxxxxxxx.png is the correct url path accessible

danharrin commented 1 year ago

The path for the file upload should be relative to the storage disk that you're using. Otherwise we don't know where the file is located that we are interacting with.

tanthammar commented 11 months ago

Maybe this is a preserve original filename thing?