How to get file size after file upload?
I am new to filament. I have requirement where after the file upload is complete. The 'Size' field in the form should have the value.
Can someone explain how do I achieve this in Filament or what approach to use?
Solution:Jump to solution
You'd have to use ->afterStateUpdated() on the file field then get the data and set it
6 Replies
Solution
You'd have to use ->afterStateUpdated() on the file field then get the data and set it
Thank you π
Once the file has been saved, can I enable a preview? Or just the name of the file
add ->preview() if it isn't previewing then check your console as where the file is you are probably getting a 404 if you haven't linked it or routed it correctly for access
Code Snippet