https://discord.cloudflare.com logo
Join Discord
Powered by
# r2
  • a

    alex85

    04/06/2023, 12:24 PM
    great! one last question, is there any way to see analytics/access logs for requests sent to
    <accountid>.r2.cloudflarestorage.com
    similar to the data provided for bucket which uses custom domains?
  • s

    Sid | R2

    04/06/2023, 12:26 PM
    If you're thinking of Web Analytics, then no, not currently (since that
    <accountid>.r2.cloudflarestorage.com
    domain does not belong to your account). The best you can do is look at the bucket-level metrics, but they might not be very useful, depending on your usage.
  • y

    yamiteru

    04/06/2023, 12:37 PM
    Hey I need to sign R2 bucket (which I've already done) and send the URL to FE. But what is the URL on local machine when I'm using miniflare?
  • y

    yamiteru

    04/06/2023, 12:40 PM
    It works perfectly alright in production where it uses the URL of an actual (not locally simulated) R2 bucket.
  • k

    kian

    04/06/2023, 12:43 PM
    Signing as in S3 presigned URLs?
  • k

    kian

    04/06/2023, 12:43 PM
    If so, there is nothing equivalent in Miniflare
  • y

    yamiteru

    04/06/2023, 12:50 PM
    Yeah and there is https://developers.cloudflare.com/r2/api/s3/presigned-urls/#presigned-url-alternative-with-workers but I don't think it can be used locally
  • y

    yamiteru

    04/06/2023, 12:51 PM
    Since, correct me if I'm wrong, miniflare doesn't expose local R2 url.
  • k

    kian

    04/06/2023, 12:51 PM
    It's not related to Workers or Miniflare so no
  • k

    kian

    04/06/2023, 12:52 PM
    They're not involved with the S3 API
  • k

    kian

    04/06/2023, 12:52 PM
    There's nothing different about Workers vs Miniflare that'd stop you using presigned URLs
  • y

    yamiteru

    04/06/2023, 12:53 PM
    There is.. there's no local R2 for local development and automated tests in Docker.
  • y

    yamiteru

    04/06/2023, 12:53 PM
    I mean no local R2 URL
  • y

    yamiteru

    04/06/2023, 12:53 PM
    I'd have to create a bucket in Cloudflare dashboard where billing applies which is not what I want
  • k

    kian

    04/06/2023, 12:54 PM
    Miniflare is only for testing Workers so yeah, it only has the R2 Workers API
  • y

    yamiteru

    04/06/2023, 12:56 PM
    Well it also locally simulates R2 and other services so one could argue it's also for testing those services from within Workers. So I've assumed since the logic is there why wouldn't the service be exposed on a local URL.
  • y

    yamiteru

    04/06/2023, 12:57 PM
    So basically if we want to use presigned URLs we HAVE to create a bucket in Cloudflare dashboard where billing applies. Currently there is no way to test it locally.
  • k

    Karew

    04/06/2023, 1:30 PM
    Did you put it behind a public domain and make sure Cloudflare’s cache is enabled for it?
  • n

    NewbieDev

    04/06/2023, 2:21 PM
    How can I configure my R2 object for cloudflare's cache? It's a simple file and all users gets the same file (only GET)
  • n

    not_james-Brown

    04/06/2023, 6:51 PM
    check this example out as a starting place. It's what I used to do something similar https://developers.cloudflare.com/r2/examples/cache-api/
  • e

    elithrar

    04/06/2023, 10:50 PM
    Better still: https://developers.cloudflare.com/r2/buckets/public-buckets/#caching
  • r

    RodolfoGS

    04/06/2023, 11:39 PM
    Hi, anyone know how to use "sip by sip migration" from S3 to R2 that is mentioned in this post? I can't find where to enable it https://blog.cloudflare.com/cloudflare-r2-super-slurper/
  • c

    Chaika

    04/06/2023, 11:43 PM
    As far as I know, the only part that is out right now is "One giant slurp", which you can find in the CF dash under R2 -> R2 Migrator. Sip by sip is still being worked on
  • c

    Chaika

    04/06/2023, 11:44 PM
    A Cloudflare Champ has made a worker to do such a thing if you're interested: https://github.com/KianNH/cloudflare-worker-s3-to-r2-migration (generic s3 -> r2 via a worker) Nothing official yet though,
  • r

    RodolfoGS

    04/07/2023, 1:05 AM
    Ok, got it, thank you so much for clarify. Maybe they could add a note in the blog
  • h

    haltbill

    04/07/2023, 6:12 AM
    Download :: 705 Mbits/s Upload :: 764.38 Mbit/s
  • h

    haltbill

    04/07/2023, 6:14 AM
    and I'm also using rclone beta
  • h

    haltbill

    04/07/2023, 6:16 AM
    @HardAtWork Is there another way to bulk upload assets (json) faster in r2?
  • h

    haltbill

    04/07/2023, 6:17 AM
    there are ~300k json files
  • h

    haltbill

    04/07/2023, 6:31 AM
    aws s3 sync
    gives just 20 KiB/s
1...979980981...1050Latest