blob.bytes() 方法将 Blob 对象的字节作为 Promise<Uint8Array> 返回。
blob.bytes()
Blob
Promise<Uint8Array>
¥The blob.bytes() method returns the byte of the Blob object as a Promise<Uint8Array>.
const blob = new Blob(['hello']); blob.bytes().then((bytes) => { console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ] }); 拷贝
const blob = new Blob(['hello']); blob.bytes().then((bytes) => { console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ] });