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

    Chaika

    04/22/2022, 7:49 PM
    idk if that is planned in the future, but as of right now it seems you need to use a worker, and bind the r2 bucket to the worrker
  • k

    kian

    04/22/2022, 7:49 PM
    https://developers.cloudflare.com/r2/get-started/
  • k

    kian

    04/22/2022, 7:50 PM
    You can access the API on
    {account_id}.r2.cloudflarestorage.com
    but I don't think you can just 'access' it through that as in load it up in a browser with a file path
  • l

    lmtr0

    04/22/2022, 7:50 PM
    hmmmm
  • l

    lmtr0

    04/22/2022, 7:50 PM
    I need a worker for that
  • k

    kian

    04/22/2022, 7:51 PM
    > You must now define authorization logic to determine who can perform what actions to your bucket. This logic lives within your Worker’s code, as it is your application’s job to determine user privileges.
  • k

    kian

    04/22/2022, 7:52 PM
    Makes it sound like Workers is the intended way for non-API access for the time being
  • l

    lmtr0

    04/22/2022, 7:52 PM
    Ok
  • l

    lmtr0

    04/22/2022, 7:52 PM
    I'm using the api though
  • l

    lmtr0

    04/22/2022, 7:53 PM
    how do I configure permissions them?
  • l

    lmtr0

    04/22/2022, 7:55 PM
    better yet
  • l

    lmtr0

    04/22/2022, 7:55 PM
    how do I generate an api key?
  • c

    Chaika

    04/22/2022, 7:56 PM
    If you want to use the S3 API and or the r2 api directly, that's something else and was discussed more above afaik. I believe you could just create a normal api key and assign it r2 permissions
  • c

    Chaika

    04/22/2022, 7:57 PM
    The other way would to make a worker that handles permissions and all that, like in the guide kian linked above
  • k

    kian

    04/22/2022, 7:57 PM
    Yeah, your API key can have Read or Edit permissions
  • k

    kian

    04/22/2022, 7:57 PM
  • l

    lmtr0

    04/22/2022, 7:59 PM
    thx
  • v

    Vitali

    04/22/2022, 8:07 PM
    Why do you need an API key for workers? Does binding the worker not work?
  • v

    Vitali

    04/22/2022, 8:07 PM
    https://developers.cloudflare.com/r2/get-started/#4-bind-your-bucket-to-a-worker
  • l

    lmtr0

    04/22/2022, 8:13 PM
    It works, but I need to use the api
  • l

    lmtr0

    04/22/2022, 8:13 PM
    first
  • l

    lmtr0

    04/22/2022, 8:13 PM
    cause If I don't
  • l

    lmtr0

    04/22/2022, 8:14 PM
    I would need to write a worker api to interact with my api
  • l

    lmtr0

    04/22/2022, 8:14 PM
    so at the end I would be mantaining 2 apis
  • i

    Isaac McFadyen | YYZ01

    04/22/2022, 8:15 PM
    Small UI bug you might want to mention to the team; when you click on the three dots to delete a bucket, it scrolls inside the panel instead of popping out. Image attached:
  • i

    Isaac McFadyen | YYZ01

    04/22/2022, 8:16 PM
  • l

    lmtr0

    04/22/2022, 8:16 PM
    Isaac You using light mode?
  • i

    Isaac McFadyen | YYZ01

    04/22/2022, 8:16 PM
    (yes I named my bucket
    hello
    )
  • l

    lmtr0

    04/22/2022, 8:16 PM
    I though you were in the dark mode side
  • i

    Isaac McFadyen | YYZ01

    04/22/2022, 8:16 PM
    Yeah... during the day, light mode.
1...505152...1050Latest