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

    mattw

    02/24/2023, 2:14 PM
    it is a generic Error type with no extra info i can discern
  • a

    aeharding

    02/24/2023, 2:29 PM
    Update: I've narrowed this down to PeerTube attempting to update object ACLs. Obviously that doesn't work on Cloudflare, however for some reason r2 just nulls out the file! https://github.com/Chocobozzz/PeerTube/issues/5646 This is calling PutObjectAclCommand from @aws-sdk/client-s3. Anyone from Cloudflare have any idea why this call would null out the object? I'd expect it to fail like Backblaze b2, not silently null out files.
  • m

    mattw

    02/24/2023, 3:02 PM
    nvm it was a corrupted uploadId, apparently this is how it manifests
  • s

    Sid | R2

    02/24/2023, 3:04 PM
    I see what's happening. Because we do not support (or parse)
    PutObjectAcl
    , your command ends up looking like a
    PutObject
    to us, so your video file gets replaced by the
    PutObjectAcl
    request's XML body, and your video file gets "corrupted". I can perhaps send back a 501 when we detect this so that your AWS client at least fails instead of overwriting your object.
  • z

    Zeblote

    02/24/2023, 3:06 PM
    why would an invalid request for
    SomethingElse
    call a shorter api
    Something
    instead of failing ?
  • s

    Sid | R2

    02/24/2023, 3:09 PM
    Well in this case it's because
    PutObjectAcl
    calls the same endpoint as
    PutObject
    , just with an extra query param, and we weren't even looking for that query param
  • a

    aeharding

    02/24/2023, 3:12 PM
    That would be fantastic. Any kind of error I suppose.
  • c

    CubityFirst

    02/24/2023, 3:56 PM
    unfortunately
  • c

    CubityFirst

    02/24/2023, 3:56 PM
    😦
  • c

    CubityFirst

    02/24/2023, 3:57 PM
    I wanted to use R2 with a different domain, but it's not on my cloudflare.
  • c

    CubityFirst

    02/24/2023, 3:57 PM
    I understand why, but it's still inconvenient lol
  • d

    Deleted User

    02/24/2023, 4:00 PM
    snippets are gonna change the world
  • u

    π™‰π™€π™†π™Š ねこ

    02/24/2023, 4:05 PM
    How do I delete all files in R2? Tried with Rclone and didn't work.
  • g

    golyalpha

    02/24/2023, 4:07 PM
    if you have minio cli, you can use
    mc rm --recursive --force [storage_prefix]/[bucket]
  • g

    golyalpha

    02/24/2023, 4:07 PM
    And if you don't care about bucket configuration, you can just delete the entire bucket
  • u

    π™‰π™€π™†π™Š ねこ

    02/24/2023, 4:08 PM
  • g

    golyalpha

    02/24/2023, 4:09 PM
    oh
  • g

    golyalpha

    02/24/2023, 4:09 PM
    this in that case then
  • u

    π™‰π™€π™†π™Š ねこ

    02/24/2023, 4:09 PM
    trying it thanks
  • u

    π™‰π™€π™†π™Š ねこ

    02/24/2023, 4:15 PM
    Do you have an example mc config? It doesn't seem to work.
  • g

    golyalpha

    02/24/2023, 4:17 PM
    mc alias set r2 [R2_URL_WITHOUT_BUCKET] [R2_ACCESS_KEY] [R2_SECRET_KEY]
    after which you'll be able to do
    mc rm --recursive --force r2/[BUCKET_NAME]
  • u

    π™‰π™€π™†π™Š ねこ

    02/24/2023, 4:18 PM
    mc: Invalid URL. URL
    https://x.r2.cloudflarestorage.com/bucket
    for MinIO Client should be of the form scheme://host[:port]/ without resource component.
  • g

    golyalpha

    02/24/2023, 4:18 PM
    yeah
  • g

    golyalpha

    02/24/2023, 4:18 PM
    do it without the bucket
  • u

    π™‰π™€π™†π™Š ねこ

    02/24/2023, 4:19 PM
    oh thank
  • g

    golyalpha

    02/24/2023, 4:19 PM
    np
  • u

    π™‰π™€π™†π™Š ねこ

    02/24/2023, 4:20 PM
  • u

    π™‰π™€π™†π™Š ねこ

    02/24/2023, 4:20 PM
    I have a question, if I want private, do I have to create 2 buckets to use a custom domain? @golyalpha
  • g

    golyalpha

    02/24/2023, 4:24 PM
    Yes
  • g

    golyalpha

    02/24/2023, 4:24 PM
    One bucket for the stuff reachable via the domain, one for the stuff reachable only via the S3 API
1...911912913...1050Latest