F
Filament16mo ago
Wellso

How do I access the meta information of uploaded files in the afterCreate hook?

Sorry if this is silly question, I'm trying to get this type of information in afterCreate name file_name mime_type path disk
Solution:
From afterCreate(), you can access the uploaded file name in $this->data['my_upload_field']. The disk and path should be a configuration thing known from context. And you can get the mimetype in regular PHP.
Jump to solution
2 Replies
Solution
Patrick Boivin
Patrick Boivin16mo ago
From afterCreate(), you can access the uploaded file name in $this->data['my_upload_field']. The disk and path should be a configuration thing known from context. And you can get the mimetype in regular PHP.
Wellso
WellsoOP16mo ago
Thanks @Patrick Boivin!
Want results from more Discord servers?
Add your server