def METHOD_NAME(data, filename, video, enrichment, recording):
    if len(data):
        slide_name, ext = os.path.splitext(os.path.basename(filename))
        if FILEPICKER:
            homedir, created = UserFolder.objects.get_or_create(
                name="home", owner=video.owner
            )
            videodir, created = UserFolder.objects.get_or_create(
                name="%s" % video.slug, owner=video.owner
            )
            previousImage = CustomImageModel.objects.filter(
                name__startswith=slugify(video.title + "_" + slide_name),
                folder=videodir,
                created_by=video.owner,
            )
            for img in previousImage:
                img.delete()
            image = CustomImageModel(folder=videodir, created_by=video.owner)
            image.file.save(
                slugify(video.title + "_" + slide_name) + ext,
                ContentFile(data),
                save=True,
            )
            image.save()
        else:
            image = CustomImageModel()
            image.file.save(
                slugify(video.title + "_" + slide_name) + ext,
                ContentFile(data),
                save=True,
            )
            image.save()
        enrichment.type = "image"
        enrichment.image = image
        enrichment.save()
    else:
        add_comment(recording.id, "file %s is empty" % filename)