Mazz
Mazz
FFilament
Created by Mazz on 5/8/2024 in #❓┊help
FileUpload
No description
6 replies
FFilament
Created by Mazz on 9/1/2023 in #❓┊help
Snapshot missing on Livewire component with id: s1fjxQ1BkDzisW8eaBSG
I have an odd behaviour with Header Actions and a Nested Form. When trying to call a Form on localhost it works as expected. The Upload works and the behaviour is the same as in Filament v2. But when deployed I get an Error Message in the Console and my list dissapears: Snapshot missing on Livewire component with id: s1fjxQ1BkDzisW8eaBSG I found the following issues but they are already merged. - https://github.com/livewire/livewire/discussions/5860 - https://github.com/livewire/livewire/pull/5889 - Filament: 3.0.39 - Livewire 3.0.1
Action::make('importExcel')
->after(function ($data) {
$filePath = $data['file'];
$fileName = $data['attachment_file_name'];

$response = Http::attach(
'file', file_get_contents(storage_path('app/public/' . $filePath)),
$fileName
)->post(env('API_URL') . '/v1/admin-kpi-tool/' . $this->cluster->id . '/memberdata/imports/upload', [
'do_import_members' => $data['do_import_members'],
]);

$memberImportId = $response->json('data.member_import_id');

$this->redirect(route(MemberImporterProgressPage::getRouteName(), [
'memberImport' => $memberImportId,
'cluster' => $this->cluster,
]));
})
->form([
FileUpload::make('file')
->required()
->directory('excel-imports')
->storeFileNamesIn('attachment_file_name'),
Checkbox::make('do_import_members')
->default(false)
->hint('Aktivieren um Mitglieder zu importieren.'),
]),
Action::make('importExcel')
->after(function ($data) {
$filePath = $data['file'];
$fileName = $data['attachment_file_name'];

$response = Http::attach(
'file', file_get_contents(storage_path('app/public/' . $filePath)),
$fileName
)->post(env('API_URL') . '/v1/admin-kpi-tool/' . $this->cluster->id . '/memberdata/imports/upload', [
'do_import_members' => $data['do_import_members'],
]);

$memberImportId = $response->json('data.member_import_id');

$this->redirect(route(MemberImporterProgressPage::getRouteName(), [
'memberImport' => $memberImportId,
'cluster' => $this->cluster,
]));
})
->form([
FileUpload::make('file')
->required()
->directory('excel-imports')
->storeFileNamesIn('attachment_file_name'),
Checkbox::make('do_import_members')
->default(false)
->hint('Aktivieren um Mitglieder zu importieren.'),
]),
2 replies