Spaces:
Running
Running
| export type RepoType = 'model' | 'dataset' | 'space'; | |
| export interface HFConfig { | |
| token: string; | |
| repo: string; | |
| repoType: RepoType; | |
| } | |
| export enum UploadStatus { | |
| IDLE = 'IDLE', | |
| UPLOADING = 'UPLOADING', | |
| SUCCESS = 'SUCCESS', | |
| ERROR = 'ERROR', | |
| } | |
| export interface FileItem { | |
| id: string; | |
| file: File; | |
| status: UploadStatus; | |
| path: string; // Destination path in repo | |
| error?: string; | |
| url?: string; // URL to the file after upload | |
| } | |
| export interface RemoteFile { | |
| path: string; | |
| size: number; | |
| url: string; | |
| } | |
| export type UploadCallback = (id: string, status: UploadStatus, error?: string, url?: string) => void; |