@eternalheart/ngx-file-preview
Version:
A powerful Angular file preview component library supporting multiple file formats including images, videos, PDFs, Office documents, text files and more.
19 lines (18 loc) • 633 B
TypeScript
import { Observable } from 'rxjs';
import { PreviewFile } from "../types";
import * as i0 from "@angular/core";
export interface FileReaderResponse {
type: 'success' | 'error';
data?: ArrayBuffer;
text?: string;
json?: any;
error?: string;
}
export declare class FileReaderService {
private responseSubject;
private readFileData;
readFile(file: PreviewFile, fileType?: 'arraybuffer' | 'text' | 'json'): Observable<FileReaderResponse>;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FileReaderService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<FileReaderService>;
}