rainx-upload
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

File Upload Component

This library was generated with Angular CLI version 13.0.0.

https://www.npmjs.com/package/rainx-upload

Installation

npm install rainx-upload

Usage

Module Import

  import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { AppRoutingModule } from './app-routing.module';
  import { AppComponent } from './app.component';
  import { RainxUploadModule } from 'rainx-upload';

 @NgModule({
   declarations: [
     AppComponent,
   ],
   imports: [
     BrowserModule,
     AppRoutingModule,
     RainxUploadModule
   ],
   providers: [],
   bootstrap: [AppComponent]
})
export class AppModule { }

In the template

<rainx-upload [multiple]="true" 
              [(files)]"="appFiles"
              [accept]="['image/png']" >
</rainx-upload>

Properties

  • multiple : Must be set to true to add multiple files

    type : booelan defaut : false

  • maxSize : Max size of file

    type : number defaut : 0

  • accept : Allowed mime types

    type : string [] defaut : []

  • enableReset : Show/hide clear button

    type: boolean default : true

  • enableDetails : Show/hide detail button and dropdown

    type: boolean default : true

Events

  • filesChange : It is triggered when the file is loaded or files reset.

    return : File[]

Readme

Keywords

none

Package Sidebar

Install

npm i rainx-upload

Weekly Downloads

2

Version

2.2.0

License

none

Unpacked Size

118 kB

Total Files

16

Last publish

Collaborators

  • emirhan.npm