Symfony2 File Upload with Related Entities

This is for a very old version of Symfony – 2.3

It might not work with the version of Symfony you’re using

Here is how I do it.

What it does? Upload an image file and an audio file and add an encode job.
The purpose is to join an image and a mp3 into a mkv file x264 encoded with ffmpeg.
But this here is only to upload the files and add the related entities. Yes I am very proud of myself for having accomplished this even if it was extremely more complicated than just doing it in PHP.

Entities:

Encodejob

Image

Audio

Form

Controller

new.html.twig

One Reply to “Symfony2 File Upload with Related Entities”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.