drag-drop-file

Drag and drop file as well as choose file

Usage no npm install needed!

<script type="module">
  import dragDropFile from 'https://cdn.skypack.dev/drag-drop-file';
</script>

README

Upload file using drag-drop

drag-drop-file implementation for get file on drag-drop as well as select file

This module works with angular 7.x

DEMO

You can check the DEMO here

Installation

npm i drag-drop-file

Usage

Module:

Import DragDropFileModule module in your module

import { DragDropFileModule } from 'drag-drop-file'

@NgModule({
  imports: [ DragDropFileModule ]
})

Component

  1. Component html file
<lib-drag-drop-file (filesDropped)="drop($event)" [lable]="'Upload file'" ></lib-drag-drop-file>

  1. Component ts file
 drop(files) {
    console.log(files, '>>>>>>>>>>>') //file list
  }
}


## License

MIT