I followed all the steps listed in the following link: http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html in order to create an entity which is able to upload files using lifecycle callbacks. It works properly when I upload a new file and also when I edit the current one, replacing the old with the new one. The entity contains not only the reference to the file, but other data (title, text...). However, I'd like to make the file field optional, that means, sometimes I'll need to upload a file when creating a new entity, sometimes not, leaving it empty. But no matter what I do, creating or editing, I cannot save the rest of the data without specifying a file. I mean, I cannot leave the file form blank. How can I do this?