Im using Symfony 3.3 and configured a file upload like in the handbook.
https://symfony.com/doc/current/controller/upload_file.html
When editing my entity in a form, after the submission of the form, the image property (like in example "Brochure") is "null", even if set it before submit.
$entity->setBrochure(new File($this->getParameter('brochures_directory').'/'.$entity->getBrochure()));
So it is not possible to decide if the user really want to remove the image or if he wants to keep it.
Did I forgot something or how is it possible to correctly handle the image?
Thank you for your answers!
Best!