Btw is this the right place to report this bug? The github repo seems the wrong place
Btw is this the right place to report this bug? The github repo seems the wrong place
<form> then you'll probably have to stick with FormData..put's third argument, options, is how you can specify content-type and whatnot to be stored with the object so that they're properly presented when viewed in a public bucket and the like.--data-binary in cURL or just binary in Postman's body options.https://example.com/dog.png and upload it to R2 as dog.png

rclone is the way to go - CopyObject can't do cross-account so that's ruled out.interface Environment {
R2: R2Bucket;
}
export default <ExportedHandler<Environment>>{
async fetch(req, env) {
if (req.method !== 'POST') {
return new Response('Method Not Allowed', {
status: 405,
headers: {
Allow: 'POST',
},
});
}
const url = new URL(req.url);
const path = url.pathname.slice(1);
try {
await env.R2.put(path, req.body, {
httpMetadata: req.headers,
});
return new Response(`Successfully uploaded ${path}`);
} catch (e) {
return new Response(`Failed to upload ${path}`, {
status: 500,
});
}
},
};rcloneHTTP GET Output;
<?xml version="1.0" encoding="UTF-8"?><CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedMethod>GET</AllowedMethod><AllowedMethod>HEAD</AllowedMethod>
<AllowedOrigin>*</AllowedOrigin><AllowedHeader>Authorization</AllowedHeader><MaxAgeSeconds>3000</MaxAgeSeconds>
</CORSRule>
</CORSConfiguration>