// dataURL to blob// 假设一个dataURL
const ImageURL = "data:image/jpeg;base64,adfasdfsafsdf// Split the base64 string in data and contentType
const block = ImageURL.split(";");
// Get the content type of the image
const contentType = block[0].split(":")[1];// In this case "image/jpeg"// get the real base64 content of the file
const realData = block[1].split(",")[1];// In this case "R0lGODlhPQBEAPeoAJosM...."// Convert it to a blob to upload
var blob = b64toBlob(realData, contentType);
// new a formDataconst formData = new FormData();
formData.append('blob', blob);