F
Filament3w ago
Veur

Show preview of uploaded image in another part of the view

I have a FileUpload component that is ->live() After an image is uploaded, I want to display a preview of the file immediately on another part of the view (not in Filepond). When I dump the data of the form after it's updated, the image field contains a value like:
"image" => [
"5e68edde-f130-4b13-b9e8-279841cefbd8" => Livewire\Features\SupportFileUploads\TemporaryUploadedFile
]
"image" => [
"5e68edde-f130-4b13-b9e8-279841cefbd8" => Livewire\Features\SupportFileUploads\TemporaryUploadedFile
]
How to render a preview of that image?
Solution:
I figured it out: $value->temporaryUrl() Thanks anyway!...
Jump to solution
3 Replies
toeknee
toeknee3w ago
What is the field you are using It'll likely be in temporary storage already.
Veur
VeurOP3w ago
FileUpload
Solution
Veur
Veur3w ago
I figured it out: $value->temporaryUrl() Thanks anyway!

Did you find this page helpful?