import type { UploadStatus } from '/@/components/Upload/src/enum';
import { UploadApiResponse } from '/@/api/sys/model/uploadModel';

interface FileItem {
  uid: string;
  name?: string;
  status?: UploadStatus;
  response: UploadApiResponse;
  percent?: number;
  url?: string;
  preview?: string;
  originFileObj?: any;
}

interface FileInfo {
  file: FileItem;
  fileList: FileItem[];
}

interface CustomFile {
  action?: string;
  data?: any;
  headers?: any;
  filename: string;
  file: File | Blob | any;
  onSuccess: (data: any, file: FileItem) => void;
  onError: (err: any, file: FileItem) => void;
  onProgress: (percentage: number, file: FileItem) => void;
  method: string;
}
