Taro.base64ToArrayBuffer(base64)
Converts a Base64 string to an ArrayBuffer object.
Type
(base64: string) => ArrayBuffer
Parameters
Parameter | Type | Description |
---|---|---|
base64 | string | The Base64 string to be converted to an ArrayBuffer object |
Sample Code
const base64 = 'CxYh'
const arrayBuffer = Taro.base64ToArrayBuffer(base64)
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
Taro.base64ToArrayBuffer | ✔️ | ✔️ | ✔️ |