feat: convert attachment path to ArrayBuffer

This commit is contained in:
eoao
2026-05-10 18:33:54 +08:00
parent f6eaf6d0fd
commit fdf4259701
5 changed files with 64 additions and 27 deletions

View File

@@ -41,7 +41,19 @@ const r2Service = {
},
async getObj(c, key) {
return await c.env.r2.get(key);
const storageType = await this.storageType(c);
if (storageType === 'KV') {
return await kvObjService.getObj(c, key);
}
if (storageType === 'R2') {
return await c.env.r2.get(key);
}
if (storageType === 'S3') {
return await s3Service.getObj(c, key);
}
},
async delete(c, key) {