You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having an issue with Uploadable. I have added an avatar property to my user. If the user updates his profile but does not change their avatar the column in the database gets set to null.
I noticed in the docs it said to add this to the form builder: ->add('avatar')
This was rendering a text input and not a file input.
I had to use this to get the file input: ->add('avatar', 'file', array('required' => false, 'data_class' => null))
I am guessing something might not be configured correctly, The upload does seem to work when actually trying to update the avatar however.
I encounter the same issue here when updating my previously added entity..
The "file" form type should not trigger the update of the entity but indeed it's updated and the path is set to NULL into the database..
I still found no solution, tried many things with no success.
I am having an issue with Uploadable. I have added an
avatar
property to my user. If the user updates his profile but does not change theiravatar
the column in the database gets set to null.I noticed in the docs it said to add this to the form builder:
->add('avatar')
This was rendering a text input and not a file input.
I had to use this to get the file input:
->add('avatar', 'file', array('required' => false, 'data_class' => null))
I am guessing something might not be configured correctly, The upload does seem to work when actually trying to update the
avatar
however.I have the following in my config.yml:
The text was updated successfully, but these errors were encountered: