How to Access TemporaryUploadedFile Data from FileUpload
Hi!
I’m using the
FileUpload
component in my Livewire form. I want to access information about the uploaded file, such as its size
, width
, and height
, using the TemporaryUploadedFile
. Can someone explain how I can achieve this?
I can retrieve the necessary information using getUploadedFileNameForStorageUsing
, but I cannot do so with afterStateUpdated
. My goal is to use afterStateUpdated
to display the data in real time, whereas getUploadedFileNameForStorageUsing
sets the data only after the changes have been saved.
2 Replies
Solution
try
TemporaryUploadedFile $state
sounds good, let me give it a try quickly
Thank you, that worked perfectly. I now see where I went wrong.