mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat(attachments): render inline cid images in place, not as attachments
Inline images (referenced by src="cid:…") are now classified at ingest and kept out of the downloadable attachment lists, RSS/Atom enclosures, and the API — while still stored in R2 and cleaned up with the email. Fixes the admin email preview, which injected raw HTML into the data: iframe so cid refs never resolved; it now rewrites them to absolute /files URLs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -19,6 +19,10 @@ export interface AttachmentData {
|
||||
contentType: string;
|
||||
size: number;
|
||||
contentId?: string; // Normalized Content-ID (no <>) used to resolve inline cid: refs
|
||||
// True when this attachment is an inline image referenced by a cid: URL in the
|
||||
// email body. Inline attachments render in place and are hidden from the
|
||||
// downloadable attachment lists, but are still stored in R2 and cleaned up.
|
||||
inline?: boolean;
|
||||
}
|
||||
|
||||
// Email interface for stored emails
|
||||
@@ -59,7 +63,8 @@ export interface EmailMetadata {
|
||||
subject: string;
|
||||
receivedAt: number;
|
||||
size?: number;
|
||||
attachmentIds?: string[];
|
||||
attachmentIds?: string[]; // Downloadable attachments (shown to the user)
|
||||
inlineAttachmentIds?: string[]; // Inline images: hidden from lists, still cleaned up
|
||||
}
|
||||
|
||||
// Feed list interface
|
||||
|
||||
Reference in New Issue
Block a user