feat: F5.5 large binary files as blobs on server F

From 16 KB a picture's or binary file's entry names its bytes by their
SHA-256 instead of holding them; the bytes are on F, content-addressed
(GET/POST /blobs with the session's grant, from the editor's origin, at
most 16 MiB). A document's blob side says where they are: the editor's
fetches and uploads, the room thread's asks F's main thread, and a start
waits for the ones asked for; without a side everything stays in the
document. Text stays Y.Text. A blob whose bytes are not there is never
written back empty. A blob F has not got yet is asked for again a few
times, and a running room reads late bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-04 16:46:50 +00:00
co-authored by Claude Opus 5.5
parent 47beda6b85
commit 4b33e36580
29 changed files with 1185 additions and 29 deletions
+3 -1
View File
@@ -41,7 +41,7 @@ import {
type FolderEntry,
type Id,
} from '@mdg-filius/core';
import { changeFiles, nodeFiles } from '@mdg-filius/doc';
import { changeFiles, nodeFiles, onBlobsArrive } from '@mdg-filius/doc';
import { WindowState, windowOf } from './windowState.js';
/** A row of the explorer's tree: every folder and file, each folder's entries after it in the order they were made. */
@@ -214,6 +214,8 @@ export class ImageViewerWindow extends WindowState {
) {
super();
doc.on('update', () => this.pathValue !== null && this.changed());
// A picture that is a blob shows once its bytes have come.
onBlobsArrive(doc, () => this.pathValue !== null && this.changed());
}
private files(): VirtualFileSystem {