export const fileReader = { /** * Read a File into a binary string */ readAsDataUrl: (file: Blob) => new Promise((resolve, reject): void => { const reader = new FileReader() reader.readAsDataURL(file) reader.onload = () => resolve(reader.result) reader.onerror = error => reject(error) }) }