https://discord.cloudflare.com logo
Join DiscordCommunities
Powered by
# r2
  • e

    echo

    05/23/2023, 12:42 PM
    hi, is there a way to restrict the R2 API tokens per bucket ?
  • k

    Karew

    05/23/2023, 12:43 PM
    Not currently, they are working on it though
  • e

    echo

    05/23/2023, 12:43 PM
    thanks @Karew
  • u

    Unsmart | Tech debt

    05/23/2023, 3:52 PM
    Location hints are only hints and once you create a bucket with a certain name the location of it will not change even if you delete it and recreate it atm
  • h

    HappyCathode

    05/23/2023, 4:57 PM
    Small question, if I distribute files less than 512MB hosted on R2, but with a custom domain with Cloudflare CDN, will the CDN requests that are a cache HIT count as R2 Class B operations? Or will the CDN effectively shield R2 from those operations?
  • h

    HappyCathode

    05/23/2023, 4:57 PM
    I'm planing on doing some tests to confirm, but I'm wondering if anybody has some experience or insight
  • k

    kian

    05/23/2023, 5:15 PM
    As long as it’s within the cache size for your plan, it will be cached
  • k

    kian

    05/23/2023, 5:24 PM
    To specify, cache hits don’t count towards operations
  • h

    hansw

    05/23/2023, 5:27 PM
    Anyone got similar issues with rclone? Am able to upload files to R2 via rclone sync /local/path/folder1 r2-bucket:folder1. (Although the UI seems weirdly showing additional folder1 file with 0B next to the real folder directory of folder1. But rclone ls rclone tree...etc never work, the program just existed right away and shows 0 output. (No error prints). While I am able to sync to remote, I have scenarios to sync it back from R2 to local. But no matter how I do the command rclone sync r2-bucket:folder1 /local/path/folder1 never works Curious if anyone have any insights on why those won't work, and what will be the workaround for R2? Thanks 🙏
  • h

    hansw

    05/23/2023, 5:27 PM
    For reference,
    Copy code
    % rclone sync -vv r2-bucket:dumps ./tests/dumps
    DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "sync" "-vv" "r2-bucket:dumps" "./tests/dumps"]
    DEBUG : Creating backend with remote "r2-bucket:dumps"
    DEBUG : Using config file from "/<user-name>/.config/rclone/rclone.conf"
    DEBUG : Resolving service "s3" region "us-east-1"
    DEBUG : Creating backend with remote "./tests/dumps"
    DEBUG : fs cache: renaming cache item "./tests/dumps" to be canonical "<path>"
    DEBUG : Local file system at <local-path>/dumps: Waiting for checks to finish
    DEBUG : Local file system at <local-path>/dumps: Waiting for transfers to finish
    DEBUG : Waiting for deletions to finish
    INFO  : There was nothing to transfer
    INFO  : 
    Transferred:              0 B / 0 B, -, 0 B/s, ETA -
    Elapsed time:         0.2s
    But I can confirm there are files in R2 interface, and the local spaces dumps/ are emptied.
  • h

    HappyCathode

    05/23/2023, 5:36 PM
    Thanks 🙂
  • i

    I love cf

    05/23/2023, 7:24 PM
    What would be the best way to upload ~30,000 small files to R2? Every file is below 1KB, all summed up below 50MB. It is fine to have filename as R2 object key. (Files are only uploaded occasionally by me, other users will only download them)
  • f

    frydim1

    05/23/2023, 7:48 PM
    I used unique names each time
  • s

    SuperVisor_16

    05/23/2023, 7:54 PM
    Hey, someone know is it possible to make bucket access only with signedURL using custom domain?
  • h

    HardAtWork

    05/23/2023, 7:58 PM
    Custom Domains do not support any API actions. They only allow getting objects
  • s

    SuperVisor_16

    05/23/2023, 7:59 PM
    I meant getting an object using signedUrl
  • s

    SuperVisor_16

    05/23/2023, 8:00 PM
    For limited period of time
  • h

    HardAtWork

    05/23/2023, 8:01 PM
    Yeah, you can't do that either. Either a custom domain exposes your objects, or it doesn't. You can't use Signed URLs with your custom domains at all
  • s

    SuperVisor_16

    05/23/2023, 8:04 PM
    Do you know is that can be possible in future or there are no plans for this at all?
  • h

    HardAtWork

    05/23/2023, 8:11 PM
    Haven't seen anything about it, but never say never...
  • h

    HappyCathode

    05/23/2023, 8:30 PM
    I think you can achieve that with an HMAC filter on the CDN part, it is functionally the same as presigned URLS : https://developers.cloudflare.com/support/firewall/learn-more/configuring-token-authentication/ That HMAC filter is only available on Cloudflare Pro thought. 20$ can get you 65 million presigned GET requests a month (55 millions + 10 free), so unless you need anything else in the pro plan, you're better off serving presigned requests directly from R2 with presigned requests. I'm not aware of anything that would prevent that.
  • i

    Isaac McFadyen | YYZ01

    05/23/2023, 8:35 PM
    Probably rclone. https://developers.cloudflare.com/r2/examples/rclone/
  • s

    SuperVisor_16

    05/23/2023, 11:09 PM
    Thanks 👍 I will take a look
  • s

    SurenNihalani

    05/24/2023, 1:48 AM
    how do I upload big files to r2: ✘ [ERROR] Error: Wrangler only supports uploading files up to 315 MB in size
  • s

    SurenNihalani

    05/24/2023, 2:46 AM
    my file is 300 GB
  • You can either use the S3 compat API or
    s

    Sid | R2

    05/24/2023, 2:51 AM
    You can either use the S3-compat API or stream it to R2 via a Worker binding
    s
    • 2
    • 3
  • d

    Dubz (pls ping/reply)

    05/24/2023, 4:14 AM
    Is there an R2 vs S3 comparison somewhere? I'm curious to learn more about them.
  • k

    Karew

    05/24/2023, 4:16 AM
  • d

    Dubz (pls ping/reply)

    05/24/2023, 4:40 AM
    Is there anything regarding cost comparison and whatnot? That just seems to be a comparison of APIs.
  • d

    Dubz (pls ping/reply)

    05/24/2023, 4:40 AM
    Like S3 has multiple tiers and is region based a bit, while R2 is more standard across the board pricing.
1...104410451046...1050Latest