修复使用S3有时无法接收邮件
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
"wrangler": "^4.7.0"
|
"wrangler": "^4.7.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.879.0",
|
"@aws-sdk/client-s3": "^3.882.0",
|
||||||
"@cloudflare/vite-plugin": "1.6.0",
|
"@cloudflare/vite-plugin": "1.6.0",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"drizzle-orm": "^0.42.0",
|
"drizzle-orm": "^0.42.0",
|
||||||
|
|||||||
617
mail-worker/pnpm-lock.yaml
generated
617
mail-worker/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -147,7 +147,11 @@ export async function email(message, env, ctx) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (attachments.length > 0 && await r2Service.hasOSS({env})) {
|
if (attachments.length > 0 && await r2Service.hasOSS({env})) {
|
||||||
await attService.addAtt({ env }, attachments);
|
try {
|
||||||
|
await attService.addAtt({ env }, attachments);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emailRow = await emailService.completeReceive({ env }, account ? emailConst.status.RECEIVE : emailConst.status.NOONE, emailRow.emailId);
|
emailRow = await emailService.completeReceive({ env }, account ? emailConst.status.RECEIVE : emailConst.status.NOONE, emailRow.emailId);
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ const s3Service = {
|
|||||||
accessKeyId: s3AccessKey,
|
accessKeyId: s3AccessKey,
|
||||||
secretAccessKey: s3SecretKey,
|
secretAccessKey: s3SecretKey,
|
||||||
},
|
},
|
||||||
|
forcePathStyle: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user