Post images: pick, scale to the server's limit, send #37
No reviewers
Labels
No labels
area/ci
area/desktop
area/packaging
area/protocol
area/reading
area/ui
area/web
area/writing
kind/bug
kind/feature
kind/infra
kind/request
needs/user
parked
perf
security
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
littlefox/neokom!37
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-33-post-images"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #33
Built on #36 (PR for #32); merge that first.
The composer gets an image field with a preview and a remove button. Files that already fit (JPEG/PNG/GIF/WebP, at most 1600 px, within the budget) are posted as they are. Anything else is scaled on a canvas to a JPEG until it fits. An image alone is posted as subject line plus raw image, as elisp and jskom do. With a caption it is posted as multipart/mixed.
The limit starts at lyskomd's default (128 KiB). When the server answers string-too-long, its status gives the real limit; Kom remembers it and the composer re-scales and retries once.
Verified:
Not verified: the desktop file dialog (GTK chooser via WebKitGTK). The smoke test does not drive file dialogs.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8