I'm seeing getting this error message: `Expected closing tag 'hr' (opened in line 5, col 1) instead
I'm seeing getting this error message:
Expected closing tag 'hr' (opened in line 5, col 1) instead of closing tag 'body'.:6:1\n Deserialization error
8 Replies
Yeah that is what I thought would happen as well. But it isn't even retrying it once.
{$metadata': { attempts: 1, totalRetryDelay: 0 } }
It's me again about the SignedUrls.
I'm having trouble reading the Signed URLs on my website. Are there other ways to improve the security of URLs that contain user images besides using Signed URLs?
I've set the maxAttempts to 10 when instantiating the client. This metadata comes from the error object.
I can see in the error response that the r2 server returns html, which I expect is the issue. The lib might expect json?
this error is thrown so I'm pretty sure it didn't succeed
Interesting! Our files are much smaller than that, not larger than 1 KB.
I've tried updating the lib to the latest version to see if that solves the retry issue. Will see how that goes
Switching away from js is not an option unfortunately
How are you measuring this?
How many requests are you making concurrently?
May I ask what BW limited means?
Ahh, thanks
Did you try using Context API
Are you able to connect your r2 bucket to a custom domain? If so then you can create a custom implementation of presigned urls using a cloudflare worker. On top of that you'd benefit from caching. However, you can also use is_timed_hmac_valid_v0() waf rule IF you have a paid cloudflare subscription
Instead of the workers method I mentioned
But still requiring the custom domain AFAIK
https://developers.cloudflare.com/workers/examples/signing-requests/
This is what I mean by the workers method
Cloudflare Docs
Sign requests | Cloudflare Workers docs
Verify a signed request using the HMAC and SHA-256 algorithms or return a 403.
Yeah i actually just connected my R2 bucket to custom domain that is running in cloudflare.
Sadly i dont have paid cloudflare subscription, but i dont mind throwing some money in if things start to work.
I'm just now checking the usage of Context API.
I think using cloudflare workers is free?
https://developers.cloudflare.com/workers/platform/pricing/
Or i need to pay 5Euro/dollar per month?
@Manqo it's free for workers