FileUpload errors after I move repeater field sort order.

Hi, I get an interesting error. If I add new item to repeater field and upload image, then everything works fine. But if I add new item, then move it to some different location and then try to upload image, I get error below:
file-upload.js?v=3.2.119.0:40 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getFiles')
at V (file-upload.js?v=3.2.119.0:40:97833)
at file-upload.js?v=3.2.119.0:1:12793
file-upload.js?v=3.2.119.0:40 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getFiles')
at V (file-upload.js?v=3.2.119.0:40:97833)
at file-upload.js?v=3.2.119.0:1:12793
And then submit button is in loading state, and I cannot save the record. Do anyone had same issue and resolved it?
Solution:
This did not helped, but upgrading to filament 3.3 did.
Jump to solution
2 Replies
!Sergo
!Sergo7d ago
Use ->reactive() and a unique ->key() in the FileUpload.
FileUpload::make('image')
->directory('uploads')
->key(fn ($get) => $get('id') ?? Str::uuid())
->reactive(),
FileUpload::make('image')
->directory('uploads')
->key(fn ($get) => $get('id') ?? Str::uuid())
->reactive(),
Try this.
Solution
varovas
varovas7d ago
This did not helped, but upgrading to filament 3.3 did.

Did you find this page helpful?