Image messages (paste/drop/pick, upload proxy, inline render) #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
posta/chat#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Parent
#2
What to build
Image attachment via file picker, clipboard paste, OR drag-and-drop — all three supported. Attaching swaps the composer to "image mode" (textarea hidden, image preview shown, send button reads "Send image"). On send, chat.posta.no streams the bytes through to posta-server's
POST /api/v1/uploads, then POSTs aposta.link/v1message referencing the returned URL. Inbound image messages render<img>inline in their bubble:loading="lazy",decoding="async",onerrorhandler swapping to.brokenplaceholder, wrapped in<a target="_blank" rel="noopener">. Bubble-width sizing withmax-height: 60vh; object-fit: contain.altfrom payload'salt(fallback toname, then "Image from ").Acceptance criteria
pasteevent on composer with an image on clipboard attaches it/api/v1/uploadsPOST /api/v1/messageswithposta.link/v1payloadposta.link/v1message is sent<img>inline with bubble-width sizing and 60vh max-heighttarget="_blank" rel="noopener").brokenplaceholder with "Image from " captionaltpopulated from payload'salt(fallbackname, fallback "Image from ")Blocked by