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

    HardAtWork

    05/13/2023, 4:42 PM
    If you are doing buckets per customer, you could just create a virtual bucket
  • i

    Iann

    05/13/2023, 4:42 PM
    bucket in buckets ?
  • h

    HardAtWork

    05/13/2023, 4:43 PM
    Give every customer their own directory in a single bucket
  • i

    Iann

    05/13/2023, 4:43 PM
    Makes sense
  • i

    Iann

    05/13/2023, 4:43 PM
    Thanks
  • s

    slothy

    05/13/2023, 5:48 PM
    Hi! I'm using boto3, and I recently switched from put_object to transfer_file for uploads, and now the ETag isn't the md5 of the file anymore
  • k

    kian

    05/13/2023, 5:52 PM
    If it's using multipart uploads then R2's ETag won't be a checksum of the file
  • s

    slothy

    05/13/2023, 5:53 PM
    is there any post-upload action I can do to fix it afterwards?
  • s

    slothy

    05/13/2023, 5:54 PM
    also, what will the ETag be after a multipart upload? just garbage?
  • r

    Ryder Cragie

    05/13/2023, 6:14 PM
    I use a file hosting provider (not Cloudflare) for 4 of my domains/subdomains; the files add up to much less than 10 GB. I've just had a banner appear on my Cloudflare account saying I get 10 GB a month for free. Would this work for all 4 of my domains/subdomains and cost me nothing? Is it easy to set up and drag/drop files to be viewable on example.com/image.png?
  • r

    Ryder Cragie

    05/13/2023, 6:14 PM
    Does it support a .htaccess file?
  • r

    Ryder Cragie

    05/13/2023, 6:15 PM
    Any way I could end up being charged?
  • d

    Dani Foldi

    05/13/2023, 6:15 PM
    if your files are all static, I recommend taking a look at https://pages.cloudflare.com, it's even better than using R2 for a static website, lower latency, has preview environments, oh and is completely free for static assets
  • d

    Dani Foldi

    05/13/2023, 6:15 PM
    neither of them run node.js/nginx/apache or anything though
  • r

    Ryder Cragie

    05/13/2023, 6:15 PM
    I don't use it for website hosting. I use it for hosting assets that appear on my website (2 seperate things).
  • r

    Ryder Cragie

    05/13/2023, 6:16 PM
    Website: www.example.com Assets/files: cdn.example.com
  • r

    Ryder Cragie

    05/13/2023, 6:16 PM
    Just images, text and videos.
  • r

    Ryder Cragie

    05/13/2023, 6:16 PM
    And maybe the odd html file.
  • d

    Dani Foldi

    05/13/2023, 6:16 PM
    R2 with a cache rule set to cache everything sounds like the ideal solution then
  • r

    Ryder Cragie

    05/13/2023, 6:16 PM
    Currently I use LiteSpeed. That's as much as I know.
  • r

    Ryder Cragie

    05/13/2023, 6:16 PM
    And it won't cost me anything ever as long as I stay under 10 GB?
  • r

    Ryder Cragie

    05/13/2023, 6:17 PM
    4 domains? (what's the max until I'll be charged?)
  • d

    Dani Foldi

    05/13/2023, 6:17 PM
    you get a 10 million class B (read) operations free per month, and you are correct, you also get 10GB free, check out https://developers.cloudflare.com/r2/pricing/
  • r

    Ryder Cragie

    05/13/2023, 6:18 PM
    So it depends on how much traffic I get from users?
  • d

    Dani Foldi

    05/13/2023, 6:18 PM
    correct
  • r

    Ryder Cragie

    05/13/2023, 6:18 PM
    So someone could cause me to pay by reloading the page a million times?
  • d

    Dani Foldi

    05/13/2023, 6:18 PM
    https://developers.cloudflare.com/r2/buckets/public-buckets/#custom-domains and here is how you can add a custom domain to a bucket
  • r

    Ryder Cragie

    05/13/2023, 6:18 PM
    Bucket... hmm... sounds complicated.
  • r

    Ryder Cragie

    05/13/2023, 6:19 PM
    Currently I just use FTP and the folders are mapped to my domains in cPanel.
  • d

    Dani Foldi

    05/13/2023, 6:19 PM
    if they can do it without triggering DDoS protection, bot fight mode, any WAF managed rule, and they all bypass the cache, then yes, 1 million reads cost $0.36 each, regardless of file size
1...102210231024...1050Latest