nxt-dropzone-wrapper 19.0.4 → 21.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,31 +19,22 @@ This is an Angular wrapper library for the [Dropzone](http://www.dropzonejs.com/
19
19
  npm install --save nxt-dropzone-wrapper dropzone
20
20
  ```
21
21
 
22
- ### Import and configure dropzone wrapper module
22
+ ### Import and configure dropzone wrapper
23
23
 
24
24
  ```ts
25
- import { DropzoneConfig, DropzoneModule, NXT_DROPZONE_CONFIG } from 'nxt-dropzone-wrapper'
25
+ import { ApplicationConfig } from '@angular/core'
26
+ import { provideDropzoneConfig } from 'nxt-dropzone-wrapper'
26
27
 
27
- const DEFAULT_DROPZONE_CONFIG: DropzoneConfig = {
28
- // Change this to your upload POST address:
29
- url: 'https://httpbin.org/post',
30
- maxFilesize: 50,
31
- acceptedFiles: 'image/*'
32
- }
33
-
34
- @NgModule({
35
- ...
36
- imports: [
37
- ...
38
- DropzoneModule
39
- ],
28
+ export const appConfig: ApplicationConfig = {
40
29
  providers: [
41
- {
42
- provide: NXT_DROPZONE_CONFIG,
43
- useValue: DEFAULT_DROPZONE_CONFIG
44
- }
30
+ provideDropzoneConfig({
31
+ // These are the global options and can also be set per instance; change url to your upload POST address:
32
+ url: 'https://httpbin.org/post',
33
+ acceptedFiles: 'image/*',
34
+ createImageThumbnails: true
35
+ })
45
36
  ]
46
- })
37
+ }
47
38
  ```
48
39
 
49
40
  ### Include it in HTML template