This commit is contained in:
eoao
2025-04-26 17:24:39 +08:00
commit 24ba4772e6
107 changed files with 13612 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
const r2Service = {
async putObj(c, key, content, metadata) {
const body = typeof content === 'string'
? new TextEncoder().encode(content)
: content;
await c.env.r2.put(key, body, {
httpMetadata: {...metadata}
});
}
};
export default r2Service;