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

    Sid | R2

    04/10/2023, 6:06 AM
    Yep! https://developers.cloudflare.com/r2/examples/aws/aws-sdk-js-v3/#generate-presigned-urls
  • h

    harris

    04/10/2023, 6:07 AM
    awesome, thanks again!
  • R2, S3
    h

    harris

    04/10/2023, 6:14 AM
    Assuming I code this to support R2, and have all the variables in my .env file, would changing them to AWS S3 be all I need to migrate if needed? Also is it possible to trigger events based on R2 uploads?
    s
    • 2
    • 2
  • u

    碧空Faraway

    04/10/2023, 7:19 AM
    Is the cache limit of the Pro account a single file size not exceeding 512MB?
  • u

    碧空Faraway

    04/10/2023, 7:20 AM
    I have an MP3 file with a size of about 1G. It is reasonable to say that it should not be cached by CF, but I cannot play it directly when I access it, but must download it all. I turned off the cache rules and it was normal.
  • u

    碧空Faraway

    04/10/2023, 7:21 AM
    I turn off the caching rules and it will start playing directly instead of having to download the whole thing first
  • h

    harris

    04/10/2023, 7:46 AM
    I'm following the example but I seem to get nested folders, is this intentional?
    s
    • 2
    • 43
  • k

    kian

    04/10/2023, 8:13 AM
    The actual filename for a given file would be
    /foo/bar/baz
    - 'folders' just delimit by
    /
  • k

    kian

    04/10/2023, 8:13 AM
    If you want files to be in
    /foo/bar/
    then you'd just write to
    /foo/bar/baz.jpg
  • u

    UtilityNFTsCreator

    04/10/2023, 11:54 AM
    Hi! I am starting to use R2. I have few questions. I can easily download the files, but I can't upload/update one single file without deleting and reuploadind everything
  • f

    Freddie_SKT

    04/10/2023, 2:11 PM
    I have 0% cache rate on my R2 storage
  • f

    Freddie_SKT

    04/10/2023, 2:11 PM
    Cloudflare is not caching a single file for my site
  • c

    Chaika

    04/10/2023, 2:14 PM
    You're talking about a custom domain on your r2 bucket, I assume? Do you have a cache rule set up to force caching?
  • c

    Chaika

    04/10/2023, 2:15 PM
    That sounds like something specific to the library/utility you are using
  • f

    Freddie_SKT

    04/10/2023, 2:16 PM
    l have cache rules to cache images but l am not getting a single image cache
  • c

    Chaika

    04/10/2023, 2:16 PM
    What's the rule you are using & the url of the image not being cached?
  • f

    Freddie_SKT

    04/10/2023, 2:19 PM
  • f

    Freddie_SKT

    04/10/2023, 2:20 PM
  • f

    Freddie_SKT

    04/10/2023, 2:21 PM
    l am using R2 and getting millions of request and cloudflare doesn't cache me anything
  • c

    Chaika

    04/10/2023, 2:21 PM
    That looks like a page rule, not a cache rule (although both should work). What's the URL that page rule is trying to match?
  • f

    Freddie_SKT

    04/10/2023, 2:22 PM
    cdn.domain.com
  • f

    Freddie_SKT

    04/10/2023, 2:22 PM
    * *
  • f

    Freddie_SKT

    04/10/2023, 2:22 PM
    front and back
  • c

    Chaika

    04/10/2023, 2:23 PM
    Your url is like
    *cdn.domain.com/*
    ?
  • f

    Freddie_SKT

    04/10/2023, 2:23 PM
    yeah
  • f

    Freddie_SKT

    04/10/2023, 2:23 PM
    on other domain the cache is working fine
  • f

    Freddie_SKT

    04/10/2023, 2:23 PM
    looks like one domain is having issue with cf
  • c

    Chaika

    04/10/2023, 2:24 PM
    You probably want just
    cdn.domain.com/*
    You might also want to move to Cache Rules at some point, they're easier overall and eventually Page rules will go away, but that shouldn't be the issue
  • c

    Chaika

    04/10/2023, 2:25 PM
    You haven't show an actual link to an image or anything more, so it's hard to say much. If you're just looking at the cache rate, that's not too helpful, it could be other items on your domain driving it down. I would check the response headers on the image itself, looking for CF-Cache-Status. There are other limits with Cache, the max file size that can be in cache for Free/Pro/Biz is 512mb
  • f

    Freddie_SKT

    04/10/2023, 2:26 PM
    l got an email from CF part saying " we may decide to take action that could include: turning off cache to your domain(s),"
1...982983984...1050Latest