feat(nbstore): add upload function to blob frontend (#11247)

This commit is contained in:
EYHN
2025-03-27 12:11:30 +00:00
parent f2cdf67c2a
commit 7091111f85
5 changed files with 116 additions and 38 deletions

View File

@@ -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> {

View File

@@ -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];
};