mirror of
https://github.com/schroinerxy/cloud-mail.git
synced 2026-06-22 03:45:52 +08:00
添加说明和MIT
This commit is contained in:
@@ -43,6 +43,10 @@ export async function email(message, env, ctx) {
|
||||
|
||||
const emailRow = await emailService.receive({ env }, params);
|
||||
|
||||
if (!env.r2) {
|
||||
console.warn('r2对象存储未配置, 附件取消保存');
|
||||
return;
|
||||
}
|
||||
|
||||
if (email.attachments.length > 0) {
|
||||
|
||||
@@ -58,11 +62,6 @@ export async function email(message, env, ctx) {
|
||||
|
||||
await attService.addAtt({ env }, attachments);
|
||||
|
||||
if (!env.r2) {
|
||||
console.log('r2对象存储未配置, 附件取消保存');
|
||||
return;
|
||||
}
|
||||
|
||||
for (let attachment of attachments) {
|
||||
await r2Service.putObj({ env }, attachment.key, attachment.content, {
|
||||
contentType: attachment.mimeType,
|
||||
|
||||
@@ -11,7 +11,7 @@ export default {
|
||||
return app.fetch(req, env, ctx);
|
||||
}
|
||||
|
||||
return env.ASSETS.fetch(req);
|
||||
return env.assets.fetch(req);
|
||||
},
|
||||
email: email
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user