import { FileUploader } from '@remirror/core' ; import { FileAttributes } from '../file-extension' ; import { getDefaultFileAttrs } from './data-url-file-uploader' ; export function createObjectUrlFileUploader ( ) { let file ; return { insert : ( f ) => { file = f ; return getDefaultFileAttrs ( file ) ; } , upload : ( ) => { const url = URL . createObjectURL ( file ) ; return Promise . resolve ( { ... getDefaultFileAttrs ( file ) , url } ) ; } , abort : ( ) : void => { } , } ; }