FilamentF
Filament15mo ago
BKF Dev

Custom FileUpload action

Hello everyone,
I have a RelationManager form which has a FileUpload input, I want to get file information same as in liverwire, so how can I do that ?
public function form(Form $form): Form { return $form ->schema([ FileUpload::make('file') ->label(__('File')) ->columnSpanFull() ->required(), TextInput::make('title') ->label(__('Title')) ->columnSpanFull(), Textarea::make('description') ->label(__('Descritption')) ->columnSpanFull(), ]); }
.....
Tables\Actions\CreateAction::make() ->slideOver() ->action(function ($data) { // how to access to file name, ext, .... dd($data['file']); }),
Was this page helpful?