aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/transport.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/transport.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/transport.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transport.js b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
index de93b2d..2f6680e 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/transport.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/transport.js
@@ -175,6 +175,18 @@ class MeshBayTransport {
return msg;
}
+ async uploadChunk(filename, chunkIndex, totalChunks, data) {
+ const msg = await this._sendAndWait({
+ type: 'file_upload',
+ v: '0.1',
+ filename,
+ chunk_index: chunkIndex,
+ total_chunks: totalChunks,
+ data: data,
+ });
+ return msg;
+ }
+
close() {
if (this._channel) this._channel.close();
if (this._pc) this._pc.close();