A simple plugin to use Cloudflare R2 as the storage provider for Medusa.
1npm i medusa-file-cloudflare-r2
1234567891011{resolve: "medusa-file-cloudflare-r2",options: {public_url: process.env.R2_PUBLIC_URL,s3_endpoint: process.env.R2_S3_ENDPOINT,bucket: process.env.R2_BUCKET_NAME,prefix: process.env.R2_PREFIX,access_key_id: process.env.R2_ACCESS_KEY,secret_access_key: process.env.R2_SECRET_KEY,},}
Where Copy to clipboard
prefix
is an optional path to prepend to every object.Other keys are required.