alife-file-to-base64
Version:
Angular simple yet powerfull library to convert file to base64
40 lines (39 loc) • 1.01 kB
TypeScript
import { EventEmitter, ElementRef } from '@angular/core';
export declare class AlifeFileToBase64Directive {
private elementRef;
type: string;
fileModel: any;
rawFileModel: any;
onFileChanged: EventEmitter<any>;
fileModelChange: EventEmitter<any>;
rawFileModelChange: EventEmitter<any>;
isTypeFile: boolean;
userCapture: boolean;
globalFilesData: any;
globalRawFilesData: any;
constructor(elementRef: ElementRef);
ngOnInit(): void;
/**
* Initialize the action
*/
init(): void;
/**
* Fire the events
*/
onFileReadingCompleted(): void;
/**
*
* Read the files and prepare the output json with base64.
*
* @param event
*/
handleFileSelection(event: any): void;
/**
* Add Event listener action on input
*/
bindFileChangeAction(): void;
/**
* Remove Event listener action on input
*/
removeFileChangeAction(): void;
}