Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A request to revert changes in removing empty file uploads #24546

Copy link
Copy link
Closed
@szymach

Description

@szymach
Issue body actions
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:

  1. 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.
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.