mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
16 lines
357 B
TypeScript
16 lines
357 B
TypeScript
|
import type { UploadProps } from '../interface';
|
||
|
|
||
|
export const successRequest: UploadProps['customRequest'] = ({ onSuccess, file }) => {
|
||
|
setTimeout(() => {
|
||
|
// @ts-ignore
|
||
|
onSuccess?.(null, file);
|
||
|
});
|
||
|
};
|
||
|
|
||
|
export const errorRequest: UploadProps['customRequest'] = ({ onError }) => {
|
||
|
setTimeout(() => {
|
||
|
// @ts-ignore
|
||
|
onError?.();
|
||
|
});
|
||
|
};
|