Function transferFileToBase64

  • 文件流或内容转 Base64

    Parameters

    • content: any

      BlobPart | any 内容

    • contentType: string

      内容类型

    • callBack: any

      回调函数

    Returns void

    transferFileToBase64(file, 'application/pdf;charset=utf-8', (res) => console.log({ res })); /// result object
    transferFileToBase64('test', 'text/plain', (res) => console.log({ res })); /// result object