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