Skip to content

Commit 8a8f1c7

Browse files
committed
1 parent 6df1211 commit 8a8f1c7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎source/application.mts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,6 +1431,7 @@ if (application.commandLineArguments.values.type === "emailServer") {
14311431
if (emailStream.sizeExceeded) throw new Error();
14321432
const feedEntryEnclosures = new Array<{ id: number }>();
14331433
for (const attachment of email.attachments) {
1434+
const content = Buffer.from(attachment.content as ArrayBuffer);
14341435
const feedEntryEnclosure = application.database.get<{
14351436
id: number;
14361437
publicId: string;
@@ -1452,7 +1453,7 @@ if (application.commandLineArguments.values.type === "emailServer") {
14521453
characters: "abcdefghijklmnopqrstuvwxyz0123456789",
14531454
})},
14541455
${attachment.mimeType},
1455-
${attachment.size},
1456+
${content.length},
14561457
${
14571458
attachment.filename?.replaceAll(
14581459
/[^A-Za-z0-9_.-]/g,
@@ -1480,7 +1481,7 @@ if (application.commandLineArguments.values.type === "emailServer") {
14801481
feedEntryEnclosure.publicId,
14811482
feedEntryEnclosure.name,
14821483
),
1483-
attachment.content,
1484+
content,
14841485
);
14851486
feedEntryEnclosures.push(feedEntryEnclosure);
14861487
}

0 commit comments

Comments
 (0)