mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-02 15:59:38 +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?.();
|
||
|
});
|
||
|
};
|