mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
fix(attachments): render inline cid: images in emails and feeds
Capture each attachment's Content-ID at ingestion (postal-mime and mailparser paths) and rewrite cid: image refs to the stored /files URL in processEmailContent, shared by the entry view and RSS/Atom feeds. Bodyless HTML fragments are now serialized so sanitization and the cid rewrite apply to them too. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import PostalMime from "postal-mime";
|
||||
import { Env } from "../types";
|
||||
import { processEmail, RawAttachment } from "./email-processor";
|
||||
import { normalizeCid } from "../utils/html-processor";
|
||||
|
||||
export async function handleCloudflareEmail(
|
||||
message: ForwardableEmailMessage,
|
||||
@@ -27,6 +28,7 @@ export async function handleCloudflareEmail(
|
||||
filename: a.filename || "attachment",
|
||||
contentType: a.mimeType || "application/octet-stream",
|
||||
content: a.content as ArrayBuffer,
|
||||
contentId: normalizeCid(a.contentId),
|
||||
}));
|
||||
|
||||
await processEmail(
|
||||
|
||||
Reference in New Issue
Block a user