Filament v3 Custom (AI and OCR) Processing Upload form Component - Worker Processing State Issue
What I am trying to do:
Create a universal file upload component in Filament v3 that processes files asynchronously using a worker queue, worker starts ocr processing using packages for jpg,xlsx,pdf, etc. for maintenance document uploads.
What I did:
Implemented a custom UniversalUploadComponent in Livewire
Created a WorkDocumentProcessor to handle document processing
Set up a relation manager for vehicle maintenance with file upload capabilities
Configured Filament form to use the custom upload component
Run worker with php artisan worker:work --workerId=1
My issue/the error:
After uploading a file and processing it through the worker queue:
The worker successfully processes the file
The file status changes to "processed" in the database
BUT the Filament UI remains stuck in "Uploading files..." state
The UI doesn't automatically update or reset after worker completes processing, preventing further interactions.
Code Snippets:
MaintenanceRelationManager form:
Section::make(('Documents'))
->schema([
BulkFileUpload::make('maintenance_documents')
->label((''))
->helperText(__(''))
->uploadDisk('public')
->uploadDirectory('maintenance_documents')
->maxFileSize(10240) // 10MB
->maxFiles(1)
->acceptedFileTypes([
'application/pdf',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'image/jpeg',
'image/png',
'image/webp',
])
])
->processorClass('App\Http\Controllers\WorkDocumentProcessor')
...
Create a universal file upload component in Filament v3 that processes files asynchronously using a worker queue, worker starts ocr processing using packages for jpg,xlsx,pdf, etc. for maintenance document uploads.
What I did:
Implemented a custom UniversalUploadComponent in Livewire
Created a WorkDocumentProcessor to handle document processing
Set up a relation manager for vehicle maintenance with file upload capabilities
Configured Filament form to use the custom upload component
Run worker with php artisan worker:work --workerId=1
My issue/the error:
After uploading a file and processing it through the worker queue:
The worker successfully processes the file
The file status changes to "processed" in the database
BUT the Filament UI remains stuck in "Uploading files..." state
The UI doesn't automatically update or reset after worker completes processing, preventing further interactions.
Code Snippets:
MaintenanceRelationManager form:
Section::make(('Documents'))
->schema([
BulkFileUpload::make('maintenance_documents')
->label((''))
->helperText(__(''))
->uploadDisk('public')
->uploadDirectory('maintenance_documents')
->maxFileSize(10240) // 10MB
->maxFiles(1)
->acceptedFileTypes([
'application/pdf',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'image/jpeg',
'image/png',
'image/webp',
])
])
->processorClass('App\Http\Controllers\WorkDocumentProcessor')
...
