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

    denchi

    03/15/2023, 6:14 PM
    I guess another way could be to add a prefix to the key on upload that says what day of the week the object was uploaded on.
  • e

    Erisa | Support Engineer

    03/15/2023, 6:15 PM
    Indeed, you can use prefixes in lots of clever ways
  • d

    denchi

    03/15/2023, 6:15 PM
    And then in the cron trigger worker I could just do a list with prefix filter.
  • d

    denchi

    03/15/2023, 6:16 PM
    Yeah, that might be a bit better. Don't have to manually check every file that way.
  • m

    markvdputten

    03/15/2023, 6:17 PM
    Hi everyone, I am new here so I am really sorry if im posting in the wrong channel. We are trying to replace S3 and some cdn providers with R2 and a custom domain option, however when my team tries to make the following calls: curl -I -X OPTIONS https://***/npm/asset-uploader/1.3.0/uploader.js We receive a response like HTTP/1.1 401 Unauthorized Would anyone be able to point me in the right direction why this happens? We have not seen this before and are really struggling to find the cause. Thanks a lot in advance
  • s

    Sid | R2

    03/15/2023, 6:23 PM
    Is this for CORS? Have you tried setting up CORS rules?
  • m

    markvdputten

    03/15/2023, 6:23 PM
    Yeah correct, we have setup CORS rules
  • s

    Sid | R2

    03/15/2023, 7:13 PM
    Are you perhaps sending headers that you haven’t added to AllowedHeaders? Note that we do require you to send a real preflight request so that we can validate it (I assume you’ve just stripped the headers in your curl example for illustrative purposes)
  • m

    markvdputten

    03/15/2023, 7:14 PM
    Thanks @Sid | R2 I will check with the team and see what they say
  • s

    Sid | R2

    03/15/2023, 7:15 PM
    Yeah it’s probably best to just rely on the browser to send the preflight request FWIW!
  • m

    markvdputten

    03/15/2023, 7:54 PM
    @Sid | R2 it seems you are right, team has now tried it in browser and all good, thanks very much for the pointers!
  • n

    nikitasius

    03/15/2023, 8:27 PM
    strange issue, wanna connect to R2 endpoint using aws cli and face the ssl issue. Regarding openssl there are no ssl
  • n

    nikitasius

    03/15/2023, 8:28 PM
    SSL validation failed
    &
    SSLV3_ALERT_HANDSHAKE_FAILURE
  • n

    nikitasius

    03/15/2023, 8:34 PM
    bruh, you use aws cli to manage the files? or another tool/lib?
  • f

    Fleetwood

    03/15/2023, 8:35 PM
    To upload or download?
  • n

    nikitasius

    03/15/2023, 8:35 PM
    upload/manage? cause my actual aws-cli (i even updated it) doesn't want to connect to my r2
  • f

    Fleetwood

    03/15/2023, 8:36 PM
    Use rclone: https://developers.cloudflare.com/r2/examples/rclone/
  • n

    nikitasius

    03/15/2023, 8:36 PM
    hmmm
  • n

    nikitasius

    03/15/2023, 8:38 PM
    @Fleetwood nice, i will try it. But i want to create a bucket with a geo preferences and regarding the API looks like only S3 api offer it
  • n

    nikitasius

    03/15/2023, 8:40 PM
    update: it takes LOOOONG time for CF to create certs & subdomain
  • f

    Fleetwood

    03/15/2023, 8:48 PM
    I presume to get large files from R2 you need to use the S3 API and do a
    GetObjectRequest
    with a Range right?
  • o

    omar

    03/15/2023, 8:49 PM
    Hey guys, I have a question about r2 storage. Does it use a CDN behind the scenes to distribute my content? If not, can you please guide me on where I can find a documentation on how to link it to a CDN? Thanks
  • k

    kian

    03/15/2023, 8:53 PM
    If you use a custom domain, yes
  • k

    kian

    03/15/2023, 8:54 PM
    You don’t necessarily need to use a range request, but you can
  • o

    omar

    03/15/2023, 8:55 PM
    Good to know, thanks. Is data then replicated to multiple regions ? Would this increase my storage quota ?
  • n

    nikitasius

    03/15/2023, 9:08 PM
    but in case of custom domain you don't need to cache the files in fact?
  • k

    Karew

    03/15/2023, 9:29 PM
    After you set up a custom R2 domain you can control cache behavior like normal using the website settings / Cache Rules
  • n

    nikitasius

    03/15/2023, 9:29 PM
    but whats the point?
  • n

    nikitasius

    03/15/2023, 9:30 PM
    as the files are manages by CF, i don't need to cache them to reduce network load
  • o

    omar

    03/15/2023, 9:30 PM
    i am not talking about browser caching, but rather the CDN features that serves the files from the closest location to the user (reduces the ping time)
1...944945946...1050Latest