0.0.2 • Published 5 years ago

@binssoft/multi-uploader v0.0.2

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

@binssoft/multi-uploader

A plugins to build your own multi uploader for your angular application. This plugin will help you to creat multiple document uploader in your application.

Build Status Support Support Support License

Please support this project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can.

Table of contents:

Getting started

Installation

npm install @binssoft/multi-uploader --save

Implementation

import "MultiUploaderModule" in your application module. For example: app.module.ts

import {MultiUploaderModule}  from '@binssoft/multi-uploader';;
@NgModule({
    imports:[
	    MultiUploaderModule
	    ...
    ]
})
export  class  AppModule { }

add configration in your component. For example : app.component.ts

export  class  AppComponent  implements  OnInit {

 config:any = null;
 ngOnInit() {
     this.config = {
        preview:true,
        type:'base64',
        upload:{
            url:'http://localhost:8080/api/1.0/upload-file',
            method:'POST',
            body: {
                ...
                _id:1,
                ...
            },
            headers: {
                "Content-Type": "application/json"
            }
        }

} }

Add multi-uploader html tag in your component html. For example : app.component.html

<multi-uploader  [config]="config"></multi-uploader>
  • config : to set the configuration of upload

Settings Option

DescriptionDefault Value
typebase64 or binarybase64
previewshow the preview or notfalse
uploadupload api configuration
upload.urlupload api url
upload.methodupload api method POST, PUT
upload.bodyupload api body
upload.headersupload api headers

Demo

Click Here for the demo

Creator

Tonmoy Nandy

License

The MIT License (MIT)

0.0.2

5 years ago

0.0.1

5 years ago