File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ class AjaxUploader extends Component<UploadProps> {
112112 . then ( processedFile => {
113113 const processedFileType = Object . prototype . toString . call ( processedFile ) ;
114114 if ( processedFileType === '[object File]' || processedFileType === '[object Blob]' ) {
115- this . post ( processedFile ) ;
115+ this . post ( processedFile as RcFile ) ;
116116 return ;
117117 }
118118 this . post ( file ) ;
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ export interface UploadProps
2020 onError ?: ( error : Error , ret : object , file : RcFile ) => void ;
2121 onSuccess ?: ( response : object , file : RcFile , xhr : object ) => void ;
2222 onProgress ?: ( event : UploadProgressEvent , file : RcFile ) => void ;
23- beforeUpload ?: ( file : RcFile , FileList : RcFile [ ] ) => boolean | Promise < RcFile > ;
24- customRequest ?: ( ) => void ;
23+ beforeUpload ?: ( file : RcFile , FileList : RcFile [ ] ) => boolean | Promise < void | File | Blob > ;
24+ customRequest ?: ( option : UploadRequestOption ) => void ;
2525 withCredentials ?: boolean ;
2626 openFileDialogOnClick ?: boolean ;
2727 transformFile ?: ( file : RcFile ) => string | Blob | RcFile | PromiseLike < string | Blob | RcFile > ;
You can’t perform that action at this time.
0 commit comments