You can create an R2 token that only has read/write access to specific buckets
You can create an R2 token that only has read/write access to specific buckets
LastAccessed time to objects then are there any clients which will throw due to an unexpected key in the schema? But, like most R2 extensions to S3, they could just throw it in a custom header (or re-use Last-Modified).The specified bucket does not exist. (Code: 10006) error. I can create another custom domain on the bucket and it works fine.


/ as the valueput API. However, I keep getting "Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)" error. I have detailed a basic code example at https://gist.github.com/e332890143f40d1803a8d2aed089c517. Has anyone run into this and/or have a solution. Much appreciated!const data = await MY_R2_BUCKET.get(key);const mytext = await data.text()LastAccessedLast-ModifiedThe specified bucket does not exist. (Code: 10006)3be0c615e0158c0ba0110ba40f2de4db36e24c32 original.png
ca96b61d7c28300963e091080819f46221f34d4a downloaded.pngputexport default <ExportedHandler<Environment>>{
async fetch(req, env) {
if (req.method === "POST") {
return Response.json(await env.R2.put("file", req.body));
}
return new Response((await env.R2.get("file"))?.body, {
headers: {
"content-type": "image/png"
}
});
}
}