File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
packages/react-storage/src/components/FileUploader Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,5 @@ docs/public/previews
25
25
26
26
# flutter assets are built with `yarn flutter:build` and should not be checked in to source control
27
27
** /public /flutter /** /
28
+
29
+ .idea
Original file line number Diff line number Diff line change @@ -32,11 +32,9 @@ export const setProcessedKeyAction = (input: {
32
32
33
33
export const setUploadingFileAction = ( {
34
34
id,
35
- uploadTask,
36
35
} : TaskEvent ) : Action => ( {
37
36
type : FileUploaderActionTypes . SET_STATUS_UPLOADING ,
38
37
id,
39
- uploadTask,
40
38
} ) ;
41
39
42
40
export const setUploadProgressAction = ( {
Original file line number Diff line number Diff line change @@ -71,10 +71,9 @@ export function useFileUploader(
71
71
} ;
72
72
73
73
const setUploadingFile : UseFileUploader [ 'setUploadingFile' ] = ( {
74
- uploadTask,
75
74
id,
76
75
} ) => {
77
- dispatch ( setUploadingFileAction ( { id, uploadTask } ) ) ;
76
+ dispatch ( setUploadingFileAction ( { id } ) ) ;
78
77
} ;
79
78
80
79
const setProcessedKey : UseFileUploader [ 'setProcessedKey' ] = ( input ) => {
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ export function useUploadFiles({
82
82
useAccelerateEndpoint,
83
83
} ) ;
84
84
85
+ setUploadingFile ( { id } ) ;
85
86
uploadFile ( {
86
87
input,
87
88
onComplete : ( event ) => {
@@ -99,11 +100,11 @@ export function useUploadFiles({
99
100
onUploadError ( error . message , { key } ) ;
100
101
}
101
102
} ,
102
- onStart : ( { key, uploadTask } ) => {
103
+ onStart : ( { key } ) => {
103
104
if ( isFunction ( onUploadStart ) ) {
104
105
onUploadStart ( { key } ) ;
105
106
}
106
- setUploadingFile ( { id, uploadTask } ) ;
107
+ // setUploadingFile({ id, uploadTask });
107
108
} ,
108
109
} ) ;
109
110
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export type PathCallback = (input: {
20
20
export type UploadTask = UploadDataOutput | UploadDataWithPathOutput ;
21
21
export interface TaskEvent {
22
22
id : string ;
23
- uploadTask : UploadTask ;
23
+ uploadTask ? : UploadTask ;
24
24
}
25
25
26
26
// omit `path` callback, `path` must always be a string to support resolving
You can’t perform that action at this time.
0 commit comments