File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,11 @@ export default function useFileUpload<T extends UploadItem = UploadItem>({
27
27
const formData = new FormData ( ) ;
28
28
formData . append ( field , item ) ;
29
29
30
- if ( data )
31
- for ( const key in data )
30
+ if ( data ) {
31
+ for ( const key in data ) {
32
32
formData . append ( key , data [ key ] ) ;
33
+ }
34
+ }
33
35
34
36
const xhr = new XMLHttpRequest ( ) ;
35
37
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export type FileUploadOptions<T extends UploadItem = UploadItem> = {
33
33
method ?: string ;
34
34
headers ?: Headers ;
35
35
timeout ?: number ;
36
- data ?: { [ key : string ] : string } ;
36
+ data ?: { [ key : string ] : string } ;
37
37
onProgress ?: ( data : OnProgressData < T > ) => void ;
38
38
onDone ?: ( data : OnDoneData < T > ) => void ;
39
39
onError ?: ( data : OnErrorData < T > ) => void ;
You can’t perform that action at this time.
0 commit comments