public function saveMedia($media)
    {
        $file = $media->getFile();
        $this->mediaStorageManager->uploadFile($file->getFilename(), $file->getRealPath(), false);

        $this->objectManager->persist($media);
        $this->objectManager->flush();

        $event = new MediaEvent($media);
        $this->dispatcher->dispatch(MediaEvents::MEDIA_ADD, $event);
    }