@miracledevs/paradigm-web-angular
Version:
An angular wrapper with base functionality and helper services.
34 lines (33 loc) • 1.35 kB
TypeScript
/*!
* Paradigm Framework - Angular Wrapper
* Copyright (c) 2017 Miracle Devs, Inc
* Licensed under MIT (https://github.com/MiracleDevs/Paradigm.Web.Shared/blob/master/LICENSE)
*/
import { ServiceBase } from './base.service';
export declare class FileService extends ServiceBase {
/**
* Reads a file as a blog.
* @param file the file that needs to be read.
* @param onProgress A progress handler to receive progress reports.
*/
readAsBlob(file: File, onProgress?: (percentage: number) => void): Promise<Blob>;
/**
* Reads a file as text.
* @param file the file that needs to be read.
* @param onProgress A progress handler to receive progress reports.
*/
readAsText(file: File, onProgress?: (percentage: number) => void): Promise<string>;
/**
* Reads a file as binary text.
* @param file the file that needs to be read.
* @param onProgress A progress handler to receive progress reports.
*/
readAsBinaryString(file: File, onProgress?: (percentage: number) => void): Promise<string>;
/**
* Reads a file and handles all the events and event removing.
* @param file the file to read.
* @param action the reading action.
* @param progress a progress handler to report progress.
*/
private read;
}