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')
. In the ->action(fn (array $data)...)
I need to get the uploaded file. According to the docs, I should do $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
?
Currently, I do something like:
Is there a better way?2 Replies
the string is the path to the real file
so you can use that to fetch the file contents
Thanks thanks