© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
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()
afterCreate()
, you can access the uploaded file name in
$this->data['my_upload_field']
$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
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

afterCreate - hook
FilamentFFilament / ❓┊help
3y ago
How do I access the uploaded file?
FilamentFFilament / ❓┊help
2y ago
Spatie Media not available in the afterCreate lifecycle hook
FilamentFFilament / ❓┊help
10mo ago
How to add meta information to the head of Filament Pages?
FilamentFFilament / ❓┊help
13mo ago