update ,
This commit is contained in:
@@ -14,6 +14,7 @@ export function fileToBase64(file: Blob): Promise<string> {
|
||||
export function base64ToFile(base64String: string, filename?: string): Promise<File> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const arr = base64String.split(',');
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
const type = arr[0].match(/:(.*?);/)![1];
|
||||
const bstr = atob(arr[1]);
|
||||
let n = bstr.length;
|
||||
|
Reference in New Issue
Block a user