r2-public-worker
r2-public-worker copied to clipboard
TypeError when navigating to URL
"outcome": "exception",
"scriptName": "r2-public-worker",
"exceptions": [
{
"name": "TypeError",
"message": "Cannot read properties of undefined (reading 'get')",
"timestamp": 1655249268624
}
Uploaded a test file (CSS), Navigated to my worker URL, Presented with an error,
Hey, could you double check the following
- Your account is entitled to use R2. (ie, are you able to access it in the dashboard)
- Did you try renaming the bucket mappings in the
wrangler.toml
? The code depends on the bucket having the namePUBLIC
for its binding.- https://github.com/cmackenzie1/r2-public-worker/blob/main/src/index.ts#L18
- https://github.com/cmackenzie1/r2-public-worker/blob/main/wrangler.toml#L6-L7