Open1
Deno Deploy から Cloudflare R2 にアクセスする
import { S3Client } from "jsr:@bradenmacdonald/s3-lite-client";
const s3 = new S3Client({
endPoint: "<accountId>.r2.cloudflarestorage.com",
region: "auto",
accessKey: "<accessKey>",
bucket: "<bucket-name>",
secretKey: "<secretKey>",
});
for await (const object of s3.listObjects()) {
console.log(object.key);
}
を利用することでアクセスできました