F
Filament3mo ago
fagner

Error on upload multiple files on livewire page component inside infolist.

Error on upload multiple files on livewire page component inside infolist.
9 Replies
toeknee
toeknee3mo ago
Ok
fagner
fagnerOP3mo ago
i try upload multiple files but show me errors on console livewire and hide modal.
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('situacao')
->autocomplete(false)
->required(),
Textarea::make('observacao'),
FileUpload::make('anexos.path')
->label('Anexos')
->multiple()
->panelLayout('compact')
->disk('do')
->storeFileNamesIn('anexos.nome')
->directory('demandas')
->visibility('public'),
]);
}
public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('situacao')
->autocomplete(false)
->required(),
Textarea::make('observacao'),
FileUpload::make('anexos.path')
->label('Anexos')
->multiple()
->panelLayout('compact')
->disk('do')
->storeFileNamesIn('anexos.nome')
->directory('demandas')
->visibility('public'),
]);
}
livewire show console error: Uncaught TypeError: Cannot read properties of undefined (reading 'after')
fagner
fagnerOP3mo ago
hey man, I messed up when creating the post on discord, sorry
toeknee
toeknee3mo ago
Looks like it's related to your custom import that's failing somewhere in your app.js
fagner
fagnerOP3mo ago
my app.js have no imports
No description
fagner
fagnerOP3mo ago
When I upload only one file, it works, but when I add two or more files at once, the modal closes unexpectedly.
toeknee
toeknee3mo ago
Look at the start of your video the import error in app.js
fagner
fagnerOP3mo ago
ok thanks, i look but error is other. when i try upload file.
No description
toeknee
toeknee3mo ago
You are uploading in a n action, try adding: ->fillForm([]) to the action to be safe

Did you find this page helpful?