WeChat Open Platform

Mini Programs Documentation

Expansion Interface

wx.arrayBufferToBase64(arrayBuffer)

Converts ArrayBuffer data into Base64 character strings.

Sample code

const arrayBuffer = new Uint8Array([11, 22, 33])
const base64 = wx.arrayBufferToBase64(arrayBuffer)

wx.base64ToArrayBuffer(base64)

Converts Base64 character strings into ArrayBuffer data.

Sample code

const base64 = 'CxYh'
const arrayBuffer = wx.base64ToArrayBuffer(base64)