Repository navigation
feat(notes): keep a page's images and attachments where Settings → Storage says - #150
Merged
Merged
Conversation
…orage says The note editor's blob source keeps images and files dropped or pasted into a page on the server (note_file), in the file store: encrypted before they leave the machine. Keys are the bytes' SHA-256 (checked), so a file is kept once per page. Images and PDFs show in place; HTML and SVG only download. Deleting a page deletes its files; the assistant sees a page's files when it reads it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XZQXJtCvJgbG1Z2H312KcS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: images or files pasted into a note lived only in the browser tab and were gone after a reload.
After: pasted or dropped images and attachments are kept on the server, in the file store from #148. That is this machine, or the storage connection chosen in Settings → Storage (#149), and each file is encrypted with its namespace's key before it leaves the machine. A reload brings the images back.
Serving rules:
When the assistant reads a note, it now sees the note's files.
How:
blobSources.maininblock-editor.tsx) holds files while the page is open and keeps them throughPUT/GET /api/v1/notes/{id}/blobs?key=…. For a page that doesn't exist yet, uploads wait until its first save.note_filetable, added throughstore.SCHEMA.GET /notes/{id}/fileslists a page's files, andDELETE /notes/{id}/files?key=removes one.test_page_filescovers the round trip, dedupe, the hash check, roles, safe serving and deletion. The full backend suite passes (637). The one test left out, besides the LibreOffice conversion test, istest_sources_and_watched_folders, which fails the same way on main in this container.🤖 Generated with Claude Code
https://claude.ai/code/session_01XZQXJtCvJgbG1Z2H312KcS
Generated by Claude Code