Let a device hand a file to the server for hashing and validation

This commit is contained in:
Claude
2026-09-30 07:50:38 +00:00
parent 30e61de36f
commit 8d57a654c1
12 changed files with 373 additions and 5 deletions

View File

@@ -108,6 +108,17 @@
}
},
// The saved File itself (disk-backed, not read into memory) — used as an
// upload body by P2P intake. null when not saved.
async getFileObject(videoId) {
try {
const found = await findHandle(videoId);
return found ? await found[0].getFile() : null;
} catch {
return null;
}
},
// Bytes [offset, offset+length) of a saved video — answers the server's
// P2P range challenges (p2p-client.js). null when the file is missing.
async readRange(videoId, offset, length) {