Attachments
Files inherit the note's permissions. Uploading a file to a private note keeps
it private. Set NOTE_ID to an accessible note and add its owner's --namespace
when needed.
Upload and retrieve
Uploads and downloads preserve bytes. cat refuses binary content; use
download for it. Downloads default to stdout if no output path is supplied.
Existing paths require explicit --overwrite where supported.
Upload an inline image and return its URL
Check dreamlake notes media upload --help for availability. Requires CLI 0.37.0 or later. If unavailable in your installed CLI, use the
HTTP upload example
with a valid API bearer token.
After dreamlake login, upload an image and print only its embeddable URL:
Choose one of those commands: each invocation uploads a new media object.
No note ID, namespace, curl, jq or --json is required. The command uses
saved login credentials and supports --remote and --token. Images and
videos are accepted; the server detects the type from the bytes. Optional
--json returns url, contentType and sizeBytes.
Use the returned URL in a Markdown or HTML file:
To append the Markdown to an existing note, set NOTE_ID to its ID and run
dreamlake notes append "$NOTE_ID" --file image.md. Uploading media alone
does not edit a note. Use Markdown for the Notes body; HTML markup is for an
HTML document. Keep the returned media URL, not its temporary storage redirect.
Anyone holding a media URL can load it without signing in. Making a note
private does not revoke that URL. To keep an image under a note's permissions,
use notes files upload ./diagram.png --note "$NOTE_ID" instead. That stores
an attachment with a logical path, not an embeddable URL. notes files preview
returns a viewer page, not an image src. Media uploads are not included in
notes files list.
Manage files
rm moves a file to trash. Use files restore --help to restore the returned
file ID, optionally to a new path. rm --purge permanently deletes stored bytes.
File write/move/remove operations support --if-match with the file's ETag,
not the note's write revision.
Preview and share
The default preview requires sign-in. HTML renders on a separate origin from the dashboard. To deliberately create or withdraw a public preview link:
A shared link opens without sign-in and does not expire. Revoking it withdraws all copies of that link. This is distinct from publishing the note itself.
Next: Notes.