@replyke/core
Version:
Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.
26 lines (25 loc) • 702 B
TypeScript
type BrowserFile = File;
export interface RNFile {
uri: string;
name: string;
type?: string;
}
type UniversalFile = BrowserFile | RNFile;
export interface UploadFileOptions {
entityId?: string;
commentId?: string;
spaceId?: string;
position?: number;
metadata?: Record<string, any>;
}
export interface UploadResponse {
fileId: string;
type: "image" | "video" | "document" | "other";
relativePath: string;
publicPath: string;
size: number;
mimeType: string;
createdAt: string;
}
declare function useUploadFile(): (file: UniversalFile, pathParts: string[], options?: UploadFileOptions) => Promise<UploadResponse>;
export default useUploadFile;