it work if I use cURL to put object by presigned url, but in browser it failed
it work if I use cURL to put object by presigned url, but in browser it failed


An HTTP header consists of its case-insensitive name followed by a colon (:), then by its value. Whitespace before the value is ignored.https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
Custom-Time metadata field, and our lifecycle rule relies in that fieldContent-Encoding: 'zstd' are downloaded as-isput in a R2 bucket? I'm using it via pages dev with sveltekit. Not sure if I should ask in r2 or if its more specifically a page/binding thingreadFileSync()put() just for the sake of testing whether and how I can work with the bindinglist() in my sveltekit dev environment with bindings does not list the file, so it is local. if the r2 is local, if I'm just passing the array buffer to the workerd runtime, shouldn't it still work?Custom-TimeContent-Encoding: 'zstd'/home/user/Software/website/node_modules/wrangler/wrangler-dist/cli.js:29773
throw a;
^
Error [AssertionError]: false == true
at new AssertionError (node-internal:internal_assertionerror:427:15)
at assert (node-internal:internal_assert:49:15)
at ArrayBufferView
(file:///home/user/Software/website/node_modules/miniflare/src/workers/core/devalue.ts:95:3)
at hydrate
(file:///home/user/Software/website/node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse.js:60:32)
at hydrate
......
{
[cause]: undefined
}Your worker has access to the following bindings:
- R2 Buckets:
- TESTINGR2: testing (local)
⎔ Starting local server...readFileSync()put()list()$api(presigned_url, {
method: 'put',
headers: {
"Content-Type": file!.type,
},
body: file
}).then(() => {
isUploading.value = false
toast.add({ title: 'File uploaded', color: 'success' })
}).catch(() =>
isUploading.value = false
)await r2.put('testing', testimage, {
httpMetadata: {
contentType: 'image/jpeg'
}
}
)