I am trying to create a Symfony form for creating and editing an entity called ‘Movie’, that is uploading an image files path to the database and the files to the server folder. I want the uploading of these files to be multiple and able for drag and drop with preview of the image and the possibility for deleting a single image before submitting the form. This entity is having a collection field named ‘images'(entity ‘Image’ with relation – One movie Many images).
I could do the creating of this entity with FileType::class that is multiple(with the preview, drag, drop), but the problem comes when I will want to edit this ‘movie’, I don’t see how I will be able to edit the entity with the same functionality when the field is collection and I am using FileType::class.
My question is am I in the right way doing this, or there is some better option, if yes if I could use some help will be awesome.
Source: Symfony Questions
Was this helpful?
0 / 0