ReviewOS

also looking at this

stacks/postline

Bluesky publishing v2: rich-text facets + image upload

#9
Merged glennmichael123 wants to merge feat/bluesky-publishing-v2 into main
8 files +347 -12
resources/assets/scripts/postline-social.tsmodified+4-0
Changes to resources/assets/scripts/postline-social.ts
@@ -24,6 +24,8 @@ export interface CrosspostInput {
2424 providers: string[]
2525 external?: { uri: string, title: string, description?: string }
2626 image?: { url: string, altText?: string }
27 /** Attached image file — uploaded to providers that accept bytes (Bluesky). */
28 imageFile?: File
2729 /** Multi-segment thread; reply-chained on providers that support it. */
2830 thread?: string[]
2931}
@@ -68,6 +70,8 @@ export async function publishCrosspost(input: CrosspostInput): Promise<{ postId:
6870 body.set('image_url', input.image.url)
6971 if (input.image.altText) body.set('image_alt', input.image.altText)
7072 }
73 if (input.imageFile)
74 body.set('image', input.imageFile, input.imageFile.name)
7175
7276 const response = await fetch('/api/postline/publish', { method: 'POST', body })
7377 const payload = await response.json()