alife-file-to-base64
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Alife File To Base64

Angular simple yet powerfull library to convert file to base64

Install file to base64 from NPM :

Run npm install alife-file-to-base64 --save

Add Dependecy to your project

  • Import AlifeFileToBase64Module to your project and include module in imports section
import { AlifeFileToBase64Module } from 'alife-file-to-base64';
 
@NgModule({
  declarations: [
  ],
  imports: [
    AlifeFileToBase64Module
  ],
  providers: [],
  bootstrap: [AppComponent]
})

Syntax

<input type="file" alife-file-to-base64 multiple (onFileChanged)="onFileChanges($event)" [(fileModel)]="files" [(rawFileModel)]="rawFiles" />

Events

  • onFileChanged : Will get called when file will get selected by user. It will contain filename, filesize, type and base64.
  • fileModel : To set the value of component variable
  • rawFileModel : To set the value of component variable for raw files

Author

Santosh Sagar

License

This module is released under the permissive MIT license

Package Sidebar

Install

npm i alife-file-to-base64

Weekly Downloads

135

Version

0.0.4

License

MIT

Unpacked Size

90.2 kB

Total Files

24

Last publish

Collaborators

  • msg2santoshsagar