Can someone help me CORS issue? Here is a test page : https://subatic.com/test It works fine on chro

Can someone help me CORS issue? Here is a test page : https://subatic.com/test It works fine on chrome/safari but NOT on firefox. (See network logs) @bonsaye does your issue persists in firefox? Can you test? Added transform rules, CORS rules. Nothing. Attachin screenshot of where it currently sits at.
Subatic
Share your thoughts with the world
13 Replies
Karew
Karew2y ago
I don't have the whole answer for you, but you should not use Transform Rules for CORS, you have to let R2 do that
kian
kian2y ago
Multipart uploads, so you'd need to presign a URL to start it, for each part and then to complete it. PutObject doesn't support more than 5 GB. Lookup S3 Multipart uploads - you make several requests uploading parts of the file.
tinfoilhat
tinfoilhatOP2y ago
i can get rid of transform rules but it still does not work.
NazCodeland
NazCodeland2y ago
@tinfoil_hats yes it works on FireFox as well, here's my cors settings
[
{
"AllowedOrigins": [
"http://localhost:8080"
],
"AllowedMethods": [
"GET",
"HEAD"
],
"AllowedHeaders": [
"range"
],
"ExposeHeaders": [
"Content-Type",
"Access-Control-Allow-Origin",
"ETag"
],
"MaxAgeSeconds": 3600
}
]
[
{
"AllowedOrigins": [
"http://localhost:8080"
],
"AllowedMethods": [
"GET",
"HEAD"
],
"AllowedHeaders": [
"range"
],
"ExposeHeaders": [
"Content-Type",
"Access-Control-Allow-Origin",
"ETag"
],
"MaxAgeSeconds": 3600
}
]
faye
faye2y ago
Hey, How do I download an entire folder, or move a folder in general in R2? Please ping me when someone answers, would appreciate it c: FoxSmile
vassbence
vassbence2y ago
Can and should i use KV for user uploaded assets like images instead of R2? My reason to do it would be that KV is globally replicated and R2 is not Assets would have a 5MB cap so would fit into KVs 25MB easily
Hello, I’m Allie!
You would list the directory, and then download/upload the resulting files as necessary. You can use rclone for this. KV isn’t globally replicated, though it does have some Cache Black Magic that means in this case, if the pricing makes sense, then I would probably go that route
vassbence
vassbence2y ago
or R2 with like s-maxage could work just as well maybe 🤔 in both cases could reads would go to a central location and after that it get's cached in the region/edge pop definitely read heavy as every uploaded file is immutable so they will be cached for as long as possible on cf with s-maxage anyways
Hello, I’m Allie!
The nice thing about KV2 is that it can do background revalidation, so you are basically always serving from Cache
Unsmart
Unsmart2y ago
If you are good with KV pricing KV should be faster than R2. R2 would be a lot cheaper though. So it basically depends if you want to improve performance or the look of your wallet LUL KV: $0.50/GB + $0.50/m-read + the worker invoke + $5.00/m-write R2: $0.015/GB + $0.36/m-cache miss read + $4.50/m-write
tinfoilhat
tinfoilhatOP2y ago
Thank you so much. That worked wonderfully. That should go in the documentation somewhere!
risy
risy2y ago
I want to move hundreds of pictures from my computer to r2, how can I do it?
Chaika
Chaika2y ago
rclone is pretty easy, & fast, although it is a CLI https://developers.cloudflare.com/r2/examples/rclone/
rclone · Cloudflare R2 docs
You must generate an Access Key before getting started. All examples will utilize access_key_id and access_key_secret variables which represent the …
Want results from more Discord servers?
Add your server