const blob = await fetch(dataURL).then(it => it.blob()); const file = new File([blob], 'fileName.jpg', {type:"image/jpeg", lastModified:new Date()});