zefoy / ngx-dropzone-wrapper

Angular wrapper library for Dropzone
MIT License
174 stars 51 forks source link

'chunking' does not exist in type 'DropzoneConfigInterface' #66

Closed sanatani9 closed 6 years ago

sanatani9 commented 6 years ago

` import { DropzoneModule } from 'ngx-dropzone-wrapper'; import { DropzoneConfigInterface,DropzoneComponent } from 'ngx-dropzone-wrapper';

const DROPZONE_CONFIG_PROD: DropzoneConfigInterface = { dictRemoveFileConfirmation: "Are you sure you want to remove this?", // Change this to your upload POST address: url: environment.apiurl+'/project/driveupload', maxFilesize: 300, method: 'post', acceptedFiles: '*', headers:{'Cache-Control': null, 'X-Requested-With': null}, paramName: 'media[]', addRemoveLinks: true, createImageThumbnails: true, chunking: true, };

this is my sample code, i want to set upload file in chunk as documented here:

http://www.dropzonejs.com/#config-chunking

but i am getting error when i set value for chunking.

this is error which i am getting:

Type '{ dictRemoveFileConfirmation: string; url: string; maxFilesize: number; method: string; acceptedF...' is not assignable to type 'DropzoneConfigInterface'. Object literal may only specify known properties, and 'chunking' does not exist in type 'DropzoneConfigInterface'.

i am using "ngx-dropzone-wrapper : 4.6.8" version.

Can someone direct me how can i solve this error?

sconix commented 6 years ago

I guess its a new feature of Dropzone. I only support latest version for Angular 5. Is there a good reson why you can not update to Angular 5?

sanatani9 commented 6 years ago

project is almost finished and ready to launch, so can't take any risk to updating to angular 5 at this stage. is there any patch to get this working?

sconix commented 6 years ago

I can make a new 4.x release later today or at the latest tomorrow with updated support for 5.2 dropzone.

sconix commented 6 years ago

There is now 4.7.0 out that has the interface updated to have the new chunking stuff.

sanatani9 commented 6 years ago

Thank you, this fixed my error