#Show preview of uploaded image in another part of the view

4 messages · Page 1 of 1 (latest)

dawn dew
#

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
]

How to render a preview of that image?

finite sonnet
#

What is the field you are using It'll likely be in temporary storage already.

dawn dew
#

FileUpload

#

I figured it out: $value->temporaryUrl()
Thanks anyway!