Cloudflare 中文文档
R2
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

Configure aws-sdk-ruby for R2

You must generate an Access Key before getting started. All examples will utilize access_key_id and access_key_secret variables which represent the Access Key ID and Secret Access Key values you generated.

Many Ruby projects also store these credentials in environment variables instead.

Add the following dependency to your Gemfile:

Then you can use Ruby to operate on R2 buckets: