Spaces:
Paused
Paused
Download types.ts from TwanAPI/testupload: direct link, hf CLI and curl.
- Browser
- Download file 632 Bytes
-
https://huggingface.co/spaces/TwanAPI/testupload/resolve/main/types.ts
- Command line
-
hf download hf://spaces/TwanAPI/testupload/types.ts
-
curl -L -o types.ts https://huggingface.co/spaces/TwanAPI/testupload/resolve/main/types.ts
632 Bytes
| 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; |