Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/examples/beforeUpload.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint no-console:0 */

import { Action } from '@/interface';
import type { Action, RcFile } from '@/interface';
import Upload from 'rc-upload';

const props = {
Expand All @@ -15,9 +15,9 @@ const props = {
onError(err) {
console.log('onError', err);
},
beforeUpload(file, fileList) {
beforeUpload(file: RcFile, fileList: RcFile[]) {
console.log(file, fileList);
return new Promise<string>(resolve => {
return new Promise<RcFile>(resolve => {
console.log('start check');
setTimeout(() => {
console.log('check finshed');
Expand Down