© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
damms005

How to get uploaded file in page action

In my List page, I have a page action with a form that contains a
FileUpload::make('test-file')
FileUpload::make('test-file')
. In the
->action(fn (array $data)...)
->action(fn (array $data)...)
I need to get the uploaded file. According to the docs, I should do
$data['test-file']
$data['test-file']
but that only contained a string (I think the internal livewire temp value for the file). How do I get the uploaded file in the
$data
$data
?

Currently, I do something like:
$filePath = Storage::disk('public')->path(array_values($this->mountedActionData['test-file'])[0]);
$filePath = Storage::disk('public')->path(array_values($this->mountedActionData['test-file'])[0]);


Is there a better way?
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

How to get file in action form
FilamentFFilament / ❓┊help
2y ago
Access the Temporary uploaded file in form action
FilamentFFilament / ❓┊help
3y ago
Show file uploaded in Infolist
FilamentFFilament / ❓┊help
2y ago
how to pass uploaded file as variable in table builder?
FilamentFFilament / ❓┊help
3y ago