const fileToUrl = ( file ) : string => { const url = window . URL || ( window as any ) . webkitURL ; try { return url . createObjectURL ( file ) ; } catch ( e ) { return '' ; } } ; const revokeUrl = ( objectUrl ) : void => { try { window . URL . revokeObjectURL ( objectUrl ) ; } catch ( e ) { } } ; export { fileToUrl , revokeUrl } ;