I'm using OneupUploaderBundle
to upload files.
It uploads file and I can create a doctrine entity from uploaded files.
But after upload how can I set this files to main entity of my form?
for example I have a Post
entity and OneupUploaderBundle
created some File
entities.
Now I want to:
- Associate
File
entities toPost
entity's OneToMany field - Delete those
File
entities if user never submit thePost
form (delete orphanFile
entities)
How can I achieve this?