Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | no |
BC Break report? | possibly |
RFC? | no |
Symfony version | 3.3.10 |
Hello,
The change introduced in #24198 broke our file upload bundle. Our flow looks like this:
- We use a form to create an entity with a file, using a form field which is not actually persisted. From it, we create a copy of the upload locally and only the file path is persisted to the database.
- On post load event, we recreate the file object from the file path in the database and then put it in the non-persisted entity field.
- When editing the entity through a form, we do not initially pass the file to the field, but instead do it if none was sent. This prevents the current value being treated as a new one and overwriting itself in the process (current file being deleted and being replaced with the same file, with a suffixed name).
The problem we face now is that the form fields are being completely removed from the request and we have no hook for our functionality. Is there a possibility to revert this change? From what I can tell, it does not actually fix anything, but provides an easier way to deal with empty uploads.