@instantdb/core
Version:
Instant's core local abstraction
40 lines • 1.21 kB
TypeScript
export type UploadFileResponse = {
data: {
id: string;
};
};
export type DeleteFileResponse = {
data: {
id: string | null;
};
};
export declare function uploadFile({ apiURI, appId, path, file, refreshToken, contentType, contentDisposition, }: {
apiURI: string;
appId: string;
path: string;
file: File | Blob;
refreshToken?: string;
contentType?: string;
contentDisposition?: string;
}): Promise<UploadFileResponse>;
export declare function deleteFile({ apiURI, appId, path, refreshToken, }: {
apiURI: string;
appId: string;
path: string;
refreshToken?: string;
}): Promise<DeleteFileResponse>;
export declare function getSignedUploadUrl({ apiURI, appId, fileName, refreshToken, metadata, }: {
apiURI: string;
appId: string;
fileName: string;
refreshToken?: string;
metadata?: Record<string, any>;
}): Promise<any>;
export declare function upload(presignedUrl: any, file: any): Promise<boolean>;
export declare function getDownloadUrl({ apiURI, appId, path, refreshToken, }: {
apiURI: string;
appId: string;
path: string;
refreshToken?: string;
}): Promise<any>;
//# sourceMappingURL=StorageAPI.d.ts.map