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

    albert

    04/28/2022, 2:55 PM
    Nah, it 401's if you don't include the header. Try "manually" sending a request with cURL.
    Copy code
    curl -i \
        --aws-sigv4 'aws:amz:us-east-1:s3' --user '<id>:<secret>' \
        -H 'X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' \
        https://e5f0f929bb59b9d5e1bc9b35e9e3bf00.r2.cloudflarestorage.com/test/automatica.mp4
  • i

    Isaac McFadyen | YYZ01

    04/28/2022, 2:56 PM
    Wait, CURL has a dedicated aws-sigv4 flag?!
  • i

    Isaac McFadyen | YYZ01

    04/28/2022, 2:56 PM
  • a

    albert

    04/28/2022, 2:57 PM
    Yeah, the later versions do. And I have the latest version, of course, I run Arch btw 😛
  • a

    albert

    04/28/2022, 3:01 PM
    The S3 specification allows signing a request with
    X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
    so you don't have to calculate the hash. But R2 doesn't seem to accept that yet :/
  • a

    albert

    04/28/2022, 3:02 PM
    Use
    HTTPS_PROXY=http://localhost:12345 rclone --no-check-certificate ...
    . I also recommend running mitmproxy with
    --set stream_large_bodies=1m
    to avoid massive memory usage.
  • e

    Erisa | Support Engineer

    04/28/2022, 3:03 PM
    thanks!
  • a

    albert

    04/28/2022, 3:08 PM
    mitmproxy stores the entire request/response body in memory by default. So this flag is useful if you're pulling internal d... ahem, I mean, if you're downloading/uploading files from/to R2.
  • a

    albert

    04/28/2022, 3:25 PM
    @Vitali are there any plans to support
    X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
    ?
  • v

    Vitali

    04/28/2022, 4:07 PM
    That should already be supported. That was the first thing we did
  • v

    Vitali

    04/28/2022, 4:09 PM
    I think I mentioned. With multipart uploads you want to be very careful to not upload too many parts at once (1-2 is safe, 2-3 is medium risk, 4+ is probably not going to work)
  • v

    Vitali

    04/28/2022, 4:10 PM
    I'll be revamping that post open beta
  • h

    HardAtWork

    04/28/2022, 4:41 PM
    Working on migrating https://www.github.com/helloimalastair/firenza to R2. Very exciting!
  • j

    john.spurlock

    04/28/2022, 8:21 PM
    Just checked this against R2, and it totally works. Need to set UNSIGNED-PAYLOAD as both the payload hash in the canonical request, and also as the
    x-amz-content-sha256
    header value
  • a

    albert

    04/28/2022, 8:23 PM
    Oh, yeah, you're right. I forgot cURL doesn't include additional headers when using --aws-sigv4, my bad...
  • j

    john.spurlock

    04/28/2022, 8:23 PM
    still missing presigned urls though (which also use UNSIGNED-PAYLOAD)
  • a

    andrew | 1003

    04/28/2022, 11:46 PM

    https://r2-sharex.andrewnet.net/file/2022/03/Discord_hBKIK4vrEd.pngâ–¾

  • j

    James

    04/28/2022, 11:48 PM
    I'm really loving seeing folks and their
    r2-sharex
    subdomains 😄
  • h

    http.james

    04/29/2022, 1:42 AM
    is r2 beta only for companies? the form says "work email", but i plan on using it for personal projects
  • h

    HardAtWork

    04/29/2022, 1:50 AM
    Every once in a while, some employees will drop beta access for whoever wants it, so keep an eye on this channel
  • h

    http.james

    04/29/2022, 1:50 AM
    when was the last time?
  • c

    Chaika

    04/29/2022, 1:59 AM
    4/11
  • c

    Chaika

    04/29/2022, 1:59 AM
    https://discord.com/channels/595317990191398933/779390076219686943/963136978063360010
  • j

    Jaex

    04/29/2022, 2:38 AM
    i implemented s3 myself in sharex without use any library, is something wrong in my implementation?
  • j

    Jaex

    04/29/2022, 2:38 AM
    how so every sharex user here have access to r2, except me as developer of the app
  • j

    Jaex

    04/29/2022, 2:41 AM
    yea it was most difficult uploader i ever implemented in sharex
  • j

    Jaex

    04/29/2022, 2:42 AM
    and i implemented hundreds of uploaders
  • j

    Jaex

    04/29/2022, 2:42 AM
    while debugging i was losing my mind
  • j

    Jaex

    04/29/2022, 2:42 AM
    luckily i could implement it in single day
  • j

    Jaex

    04/29/2022, 2:44 AM
    because s3 was retuning that something is wrong in signature, and i had no clue what is, so it was hours of try and error to figure out what part is causing the issue
1...717273...1050Latest