Skip to main content

R2_ACCESS_KEY_ID

Constant R2_ACCESS_KEY_ID 

Source
pub const R2_ACCESS_KEY_ID: &str = "R2_ACCESS_KEY_ID";
Expand description

Worker secret holding the access key ID of an R2 API token, for presigned R2 URLs.

Create the token in the dashboard (R2 > Manage API tokens, “Object Read & Write” on the bucket), put it in .dev.vars and upload it with ocre secrets push R2_ACCESS_KEY_ID R2_SECRET_ACCESS_KEY --file .prod.vars.

§Examples

assert_eq!(ocre::storage::R2_ACCESS_KEY_ID, "R2_ACCESS_KEY_ID");