添加说明和MIT

This commit is contained in:
eoao
2025-04-27 09:09:43 +08:00
parent ba3442ccb1
commit 741f839d09
12 changed files with 213 additions and 32 deletions

View File

@@ -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,

View File

@@ -11,7 +11,7 @@ export default {
return app.fetch(req, env, ctx);
}
return env.ASSETS.fetch(req);
return env.assets.fetch(req);
},
email: email
};