錯誤寫法(這種寫法固定死了型別,會不匹配):
const data = canvas.toDataURL('image/jpeg', quality);
調整成:
let fileType = xxxObj.type
const data = canvas.toDataURL(fileType, quality);
錯誤寫法(這種寫法固定死了型別,會不匹配):
const data = canvas.toDataURL('image/jpeg', quality);
調整成:
let fileType = xxxObj.type
const data = canvas.toDataURL(fileType, quality);