filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.49k stars 2.98k forks source link

The FileUpload component when set as multiple() sometimes skips some files if the relation manager has ->poll(). #14474

Open danilogiacomi opened 1 month ago

danilogiacomi commented 1 month ago

Package

filament/forms

Package Version

v3.2.116

Laravel Version

v11.27.2

Livewire Version

v3.5.4

PHP Version

PHP 8.3.12

Problem description

The FileUpload component when set as multiple() sometimes skips some files if the relation manager has ->poll().

In this scenario I have an action opening a modal with the FileUpload in its form and the creation of one entities for each uploaded file (within the action itself).

The Resource, then, has a relationManager with the entities created in the above-mentioned action.

If in the relationManager we add a ->poll('5s') then the issue appears, if we don't it works flawlessly.

I've created a repo with the two versions of the Resources so you can try it out both the working and the non-working version.

Please find the repository at the following URL, I've added a little instruction and additional information in the README and it also is shipped with some test files to be uploaded, for your convenience.

https://github.com/danilogiacomi/filamentFileUploadProblem

Expected behavior

All the file uploaded to be present

Steps to reproduce

Using the provided repository, got to /admin/polling-orders create a "New polling order", use the "Mass upload images" button to upload mulitple files (the repo also contains 32 sample files in the "exampleFiles" directory.

Note that the /admin/orders resource, which doesn't have the ->poll() in the resourceManager works flawlessly

Reproduction repository (issue will be closed if this is not valid)

https://github.com/danilogiacomi/filamentFileUploadProblem

Relevant log output

N/A

Donate 💰 to fund this issue

Fund with Polar