public function initializeMediaFromUploadedFile(UploadedFile $uploadedFile, $folderId, $siteId, $title = null)
    {
        /** @var MediaInterface $media */
        $media = new $this->mediaClass();
        $media->setSiteId($siteId);
        $media->setFile($uploadedFile);
        $media->setFilesystemName($uploadedFile->getFilename());
        $media->setMediaFolder($this->folderRepository->find($folderId));
        $media->setName($uploadedFile->getClientOriginalName());
        $media->setMimeType($uploadedFile->getMimeType());
        if (null === $title) {
            $title = $uploadedFile->getFilename();
        }
        foreach ($this->frontLanguages as $language) {
            $media->addTitle($language, $title);
        }

        return $media;
    }