Temporary files are never moved
I am using Filament's Wizard for a multi-step form. On step 1, the model is created. On the last step, some files are uploaded. Those files make it to the livewire-tmp directory, but they are never moved after the form is submitted.
The files are not renamed or moved. I feel like I probably need to call a method to process the files, but the documentation doesn't mention it.
Step::make('File Attachments')
->schema(function () {
$fields = [];
foreach (Installer::$onboardingFiles as $field => $options) {
$fields[$field] =
Section::make([
FileUpload::make($field)
->label($options['title'])
->storeFileNamesIn($field . '_name')
->directory(fn () => 'installers/' . $this->installer->id . '/documents/' . $options['directory'])
->getUploadedFileNameForStorageUsing(fn (TemporaryUploadedFile $file): string => $options['filename'] . '.' . $file->guessExtension())
->disk('s3')
->hidden(fn (Get $get): bool => $get($field . '_toggle')),
])
]);
}
return $fields;
}),
])
->submitAction(new HtmlString(Blade::render(<<<BLADE
<x-filament::button
type="submit"
size="sm"
wire:click="create"
>
Submit
</x-filament::button>
BLADE)))
]);
}
public function create(): void
{
$this->updateModel(5);
} Step::make('File Attachments')
->schema(function () {
$fields = [];
foreach (Installer::$onboardingFiles as $field => $options) {
$fields[$field] =
Section::make([
FileUpload::make($field)
->label($options['title'])
->storeFileNamesIn($field . '_name')
->directory(fn () => 'installers/' . $this->installer->id . '/documents/' . $options['directory'])
->getUploadedFileNameForStorageUsing(fn (TemporaryUploadedFile $file): string => $options['filename'] . '.' . $file->guessExtension())
->disk('s3')
->hidden(fn (Get $get): bool => $get($field . '_toggle')),
])
]);
}
return $fields;
}),
])
->submitAction(new HtmlString(Blade::render(<<<BLADE
<x-filament::button
type="submit"
size="sm"
wire:click="create"
>
Submit
</x-filament::button>
BLADE)))
]);
}
public function create(): void
{
$this->updateModel(5);
}The files are not renamed or moved. I feel like I probably need to call a method to process the files, but the documentation doesn't mention it.