UNPKG

@googleforcreators/media

Version:

Functionality for creating and working with media resources in the Web Stories editor.

3 lines (2 loc) 295 B
function e(e){const r=new FileReader;return new Promise(((n,t)=>{r.addEventListener("load",(()=>{n(new Uint8Array(r.result))})),r.addEventListener("error",(()=>{t(new Error(`Could not read file ${e.name}`))})),r.readAsArrayBuffer(e)}))}export{e as default}; //# sourceMappingURL=readFile.js.map