MCPcopy Create free account
hub / github.com/FxEmbed/FxEmbed / createR2S3Client

Function createR2S3Client

tools/credential-tools.mjs:44–50  ·  view source on GitHub ↗
(env)

Source from the content-addressed store, hash-verified

42}
43
44function createR2S3Client(env) {
45 return new S3Client({
46 region: 'auto',
47 endpoint: `https://${env.accountId}.r2.cloudflarestorage.com`,
48 credentials: { accessKeyId: env.accessKeyId, secretAccessKey: env.secretAccessKey }
49 });
50}
51
52function base64UrlToBuffer(b64url) {
53 const pad = '='.repeat((4 - (b64url.length % 4)) % 4);

Callers 2

presignFunction · 0.85
pullFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected