19.0.4 • Published 6 months ago
nxt-dropzone-wrapper v19.0.4
Angular Dropzone wrapper
This is an Angular wrapper library for the Dropzone. For full documentation on Dropzone configuration options see Dropzone documentation.
Quick links
Installing
npm install --save nxt-dropzone-wrapper dropzone
Import and configure dropzone wrapper module
import { DropzoneConfig, DropzoneModule, NXT_DROPZONE_CONFIG } from 'nxt-dropzone-wrapper'
const DEFAULT_DROPZONE_CONFIG: DropzoneConfig = {
// Change this to your upload POST address:
url: 'https://httpbin.org/post',
maxFilesize: 50,
acceptedFiles: 'image/*'
}
@NgModule({
...
imports: [
...
DropzoneModule
],
providers: [
{
provide: NXT_DROPZONE_CONFIG,
useValue: DEFAULT_DROPZONE_CONFIG
}
]
})
Include it in HTML template
This library provides two ways to create a Dropzone element, component for simple use cases and directive for more custom use cases.
Use dropzone component
<nxt-dropzone [config]="config"
message="Click or drag images here to upload"
(error)="onUploadError($event)"
(success)="onUploadSuccess($event)"></nxt-dropzone>
Use dropzone directive
When using only the directive you need to provide your own theming or import the default theme (dropzone/dist/dropzone.css
).
<div class="dropzone"
[nxtDropzone]="config"
(error)="onUploadError($event)"
(success)="onUploadSuccess($event)"></div>
19.0.0
7 months ago
19.0.4
6 months ago
18.0.0
1 year ago
17.0.1
2 years ago
17.0.0
2 years ago
16.2.0
2 years ago
16.1.0
2 years ago
16.0.0-alpha.8
2 years ago
16.0.0
2 years ago
16.0.0-alpha.0
2 years ago
16.0.0-alpha.1
2 years ago
16.0.0-alpha.2
2 years ago
16.0.0-alpha.3
2 years ago
15.0.0
2 years ago
16.0.0-alpha.6
2 years ago
14.0.0
3 years ago
13.0.0
3 years ago