Undefined file property when performing an upload Undefined file property when performing an upload symfony symfony

Undefined file property when performing an upload


Here is the answer, works for me ! ;)

finally i fixed the problem. When using LifecycleCallbacks you do not have to call the upload method in your controller anymore otherwise it will cause an error.

Source:http://forum.symfony-project.org/viewtopic.php?f=23&t=35933


Try with a remove of $entity->upload(); in your action


Change unset($this->file); by $this->file = null;