ReviewOS

also looking at this

stacks/postline

Queued posts carry title, link card, and image through to publish

#13
Merged glennmichael123 wants to merge feat/queue-content into main
8 files +158 -11
8 days ago

Summary

Closes the last queue gap: scheduled and drafted posts previously published with text only — the link preview, attached image, and explicit blog title were dropped at save time.

  • New posts.content column persists { title?, external?, media? } as JSON
  • Uploaded images are stored under storage/app/postline-media/ (gitignored) until publish; publish hydrates them back to bytes for the Bluesky blob upload, then deletes the file — deletes also clean up
  • publish-now and the scheduled sweep pass the hydrated PublishContent through, so a scheduled blog post keeps its explicit title + full body, and a scheduled Bluesky post keeps its link card and image
  • Queue items show image / link card badges

Bug found along the way

request.file('image') returns a raw Web File (the router's multipart parser stores File objects), not the typed FileInfo shape (buffer/mimetype) — so the publish action's image upload was silently dropping files too. A shared readUploadedImage helper now accepts both shapes; both actions use it.

Verification (live, authenticated)

  • Save with title + link + image file → content JSON persisted, file on disk
  • Publish-now → blog post has the explicit title with unstripped body; media file removed after success
  • Delete a draft with an image → file removed from disk
  • Queue list exposes hasImage/hasLink correctly
  • bun test 21 pass, pickier clean, tsc --noEmit exit 0

8 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.