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 <[email protected]>
This commit is contained in:
1 parent
6cd2d425a2
commit
debbfc623e
9 files changed
+187
-7
No files matched your search
@@ -21,6 +21,7 @@ export interface RawAttachment {
|
||||
filename: string;
|
||||
contentType: string;
|
||||
content: ArrayBuffer;
|
||||
contentId?: string;
|
||||
}
|
||||
|
||||
export interface ProcessEmailInput {
|
||||
@@ -88,6 +89,7 @@ async function uploadAttachments(
|
||||
filename: att.filename,
|
||||
contentType: att.contentType,
|
||||
size: att.content.byteLength,
|
||||
...(att.contentId ? { contentId: att.contentId } : {}),
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user