public static function getDataUriFromUploadedFile(UploadedFile $file)
    {
        return sprintf('data:%s;base64,%s', $file->getMimeType(), base64_encode(file_get_contents($file->getPathname())));
    }