Function toBase64FromMedia

  • This function converts a file buffer into a base64 string so that it can be sent to Weaviate and stored as a media field.

    Parameters

    • media: string | Buffer

    Returns Promise<string>

    The base64 string