Replies: 1 comment
-
|
Anyone? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Package
Form builder
Package Version
V3.0.0
How can we help you?
Bug Report: Incorrect Image URL in File Upload Preview
Description
When uploading an image using FileUpload in Filament, the file is correctly stored in the specified custom disk (public_uploads), which points to public/uploads. However, during edit or view, Filament tries to fetch the image from storage/certificates/... instead of uploads/certificates/....
Steps to Reproduce
'public_uploads' => [
'driver' => 'local',
'root' => public_path('uploads'), // Store in public/uploads
'visibility' => 'public',
],
FileUpload::make('certificate')
->label('Upload Calibration Certificate')
->disk('public_uploads') // Custom disk
->image()
->moveFiles()
->directory('certificates')
->imagePreviewHeight(100)
->visibility('public')
->openable()
->required(),
Upload an image (e.g., 01JQ3WBRMVMXBG5ZBYATD3V2F8.jpg).
The file gets correctly stored in public/uploads/certificates/.
However, when editing or viewing the record, Filament attempts to preview the image from storage/certificates/..., which results in a broken image.
Expected Behavior
Filament should correctly use the custom disk's path (uploads/certificates/...) instead of defaulting to storage/certificates/....
Actual Behavior
Filament tries to fetch the image from storage/certificates/..., causing the preview to fail.
Also in imagecolumn, the issue exists
ImageColumn::make('certificate')
->circular()
->disk('public_uploads')
, // Custom URL
Beta Was this translation helpful? Give feedback.
All reactions