In my Doctrine entity, which is data_class
for my form I have a file property defined like this:
/**
* Image.
*
* @Assert\\NotBla
I have was in similar situation. I try to edit existing record in database with path to the file. When i edit record i must upload new file, what is not comfortable for users. In my solution i use variable tmp file for file hash and variable file name. All needed operation i made in Action edit class.
Full example action class in bellow link
https://github.com/marekz/php_examples/wiki/Symfony-how-to-edit-attachment-form