mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 14:56:59 +08:00
feat(nbstore): add upload function to blob frontend (#11247)
This commit is contained in:
@@ -238,10 +238,10 @@ class WorkerBlobSync implements BlobSync {
|
||||
return this.client.ob$('blobSync.blobState', blobId);
|
||||
}
|
||||
|
||||
downloadBlob(blobId: string): Promise<void> {
|
||||
downloadBlob(blobId: string): Promise<boolean> {
|
||||
return this.client.call('blobSync.downloadBlob', blobId);
|
||||
}
|
||||
uploadBlob(blob: BlobRecord): Promise<void> {
|
||||
uploadBlob(blob: BlobRecord): Promise<true> {
|
||||
return this.client.call('blobSync.uploadBlob', blob);
|
||||
}
|
||||
fullDownload(peerId?: string, signal?: AbortSignal): Promise<void> {
|
||||
|
||||
@@ -71,8 +71,8 @@ interface GroupedWorkerOps {
|
||||
blobSync: {
|
||||
state: [void, BlobSyncState];
|
||||
blobState: [string, BlobSyncBlobState];
|
||||
downloadBlob: [string, void];
|
||||
uploadBlob: [BlobRecord, void];
|
||||
downloadBlob: [string, boolean];
|
||||
uploadBlob: [BlobRecord, true];
|
||||
fullDownload: [string | null, void];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user