File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export interface DropZoneProps {
37
37
uploadSuccessCallback ?: ( files : FileList ) => boolean ,
38
38
uploadErrorCallback ?: ( files : FileList , error : string ) => boolean ,
39
39
addCallBack ? : ( ) => void ,
40
- dropzoneParams : any
40
+ dropzoneParams : Map < string , any >
41
41
}
42
42
43
43
const initialDropzoneParameter = {
@@ -92,8 +92,7 @@ export const DropZone = React.forwardRef<HTMLFormElement, DropZoneProps>(
92
92
chunking : chunking == "1" ?? false ,
93
93
chunkSize : chunkSize != "" ? Number . parseInt ( chunkSize ) : 2000000 ,
94
94
retryChunks : true ,
95
- url : url ,
96
- params : { ...dropzoneParams }
95
+ url : url
97
96
} ;
98
97
99
98
const processQueue : React . MouseEventHandler < HTMLButtonElement > = ( ) => {
@@ -229,6 +228,12 @@ export const DropZone = React.forwardRef<HTMLFormElement, DropZoneProps>(
229
228
formData . append ( 'dztotalfilesize' , file . size ) ;
230
229
formData . append ( 'dzchunksize' , dropZoneParameter . chunkSize . toString ( ) ) ;
231
230
}
231
+
232
+ if ( dropzoneParams ) {
233
+ for ( const [ key , value ] of Object . entries ( dropzoneParams ) ) {
234
+ formData . append ( key , value )
235
+ }
236
+ }
232
237
}
233
238
234
239
}
You can’t perform that action at this time.
0 commit comments