UNPKG

fctrlx-angular-file-reader

Version:

Angular library that helps convert file (from input[type=file]) to base64/arrayBuffer/text using FileReader API.

7 lines (6 loc) 266 B
import { Observable } from 'rxjs'; export interface FileReaderInterface { toBase64(file: File): Observable<string> | Promise<string>; toText(file: File): Observable<string> | Promise<string>; toArrBuf(file: File): Observable<string> | Promise<string>; }