function blobToFile(blob, fileName, type) { return new File([blob], fileName, { type }); } function fileToDataURL(file, cb) { const reader = new FileReader(); reader.onload = ({ target }) => cb(target.result); reader.readAsDataURL(file); } export { fileToDataURL, blobToFile };