I'm working on a project locally and i cannot get the worker to emulate an R2 bucket locally. It works if I use --remote but I want to be able to just use it locally.
const timeout = new Promise<Response>((_, reject) => {
const id = setTimeout(() => {
clearTimeout(id);
reject(new Response('Request timed out', { status: 408 }));
}, 30000); // 30 seconds timeout
});
const putOperation = c.env.MY_BUCKET.put(key, data);
await Promise.race([timeout, putOperation]);
just seem to time out every time locally.