Browse Source

fix: fix base64 blob (#1356)

* fix(type): fix ant-design-vue  ->

* fix: fix base64 blob
pull/1358/head
CXM 5 years ago
committed by GitHub
parent
commit
013cb7f16b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/utils/file/base64Conver.ts

2
src/utils/file/base64Conver.ts

@ -5,7 +5,7 @@ export function dataURLtoBlob(base64Buf: string): Blob {
const arr = base64Buf.split(','); const arr = base64Buf.split(',');
const typeItem = arr[0]; const typeItem = arr[0];
const mime = typeItem.match(/:(.*?);/)![1]; const mime = typeItem.match(/:(.*?);/)![1];
const bstr = atob(arr[1]); const bstr = window.atob(arr[1]);
let n = bstr.length; let n = bstr.length;
const u8arr = new Uint8Array(n); const u8arr = new Uint8Array(n);
while (n--) { while (n--) {

Loading…
Cancel
Save