{"_id":"@agilo/medusa-file-r2","_rev":"7-1e68d09f2fedda3e3c6e4236f718cab9","name":"@agilo/medusa-file-r2","dist-tags":{"canary":"1.1.2-0","latest":"1.0.0"},"versions":{"1.0.0-0":{"name":"@agilo/medusa-file-r2","version":"1.0.0-0","keywords":["medusa-plugin","medusa-file-plugin","cloudflare-r2"],"author":{"name":"Ante Primorac","email":"ante@agilo.co"},"license":"MIT","_id":"@agilo/medusa-file-r2@1.0.0-0","maintainers":[{"name":"ilimic","email":"ilimic1@gmail.com"},{"name":"josipmatichr","email":"josip@agilo.co"},{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},{"name":"alenvuletic","email":"alenvuletic@gmail.com"}],"homepage":"https://github.com/Agilo/medusa-file-r2#readme","bugs":{"url":"https://github.com/Agilo/medusa-file-r2/issues"},"dist":{"shasum":"87c101e505ac081206297db23cc3f66b07f03ee2","tarball":"https://registry.npmjs.org/@agilo/medusa-file-r2/-/medusa-file-r2-1.0.0-0.tgz","fileCount":3,"integrity":"sha512-JISrUozde7ZrcZ8+fWowLGvxuBR1bfLMrqUQlelq26rW67sVSikxAug/FOz4F7Ex34cMtL4F4BLOLbhuJrlFFg==","signatures":[{"sig":"MEUCIE9+MgydIQ9Sp8YEXY2sPPwCAL/KYhwlAcRO0y+5YtefAiEAl672B/jXaG1jkWRhuxwxb9Vr7wmr7scte1RUE6IY1oo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9749},"gitHead":"10f7b941a653f3505af91a45f4a761133961538b","scripts":{"dev":"npm run bundle -- --watch","build":"npm run bundle","bundle":"esbuild src/services/** --outdir=services --format=cjs --target=esnext"},"_npmUser":{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},"repository":{"url":"git+https://github.com/Agilo/medusa-file-r2.git","type":"git"},"_npmVersion":"9.7.2","description":"Cloudflare R2 storage plugin for Medusa","directories":{},"_nodeVersion":"20.3.1","dependencies":{"aws-sdk":"^2.1572.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.0.0","eslint":"^8.57.0","esbuild":"^0.20.1","prettier":"^3.2.5","cross-env":"^7.0.3","typescript":"^5.4.2","@types/node":"^20.11.25","@types/multer":"^1.4.11","@types/aws-sdk":"^2.7.0","@medusajs/medusa":">=1.20.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.1.1","babel-preset-medusa-package":"^1.1.19","@typescript-eslint/eslint-plugin":"^7.1.1"},"peerDependencies":{"@medusajs/medusa":">=1.20.0"},"_npmOperationalInternal":{"tmp":"tmp/medusa-file-r2_1.0.0-0_1709813559611_0.5985876772357783","host":"s3://npm-registry-packages"}},"1.1.0-0":{"name":"@agilo/medusa-file-r2","version":"1.1.0-0","keywords":["medusa-plugin","medusa-file-plugin","cloudflare-r2"],"author":{"name":"Ante Primorac","email":"ante@agilo.co"},"license":"MIT","_id":"@agilo/medusa-file-r2@1.1.0-0","maintainers":[{"name":"ilimic","email":"ilimic1@gmail.com"},{"name":"josipmatichr","email":"josip@agilo.co"},{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},{"name":"alenvuletic","email":"alenvuletic@gmail.com"}],"homepage":"https://github.com/Agilo/medusa-file-r2#readme","bugs":{"url":"https://github.com/Agilo/medusa-file-r2/issues"},"dist":{"shasum":"70c7198b73162c7ace867ef48f46c42325d2c9ec","tarball":"https://registry.npmjs.org/@agilo/medusa-file-r2/-/medusa-file-r2-1.1.0-0.tgz","fileCount":3,"integrity":"sha512-FQhvZvcvodkO18SMZSW8MBuGDuFt38DZ6kLCvgpcapWlA8r8jMZyMtqVyo6hjD3gLfKa8NoQTYAZIwKijyHREw==","signatures":[{"sig":"MEUCIQDuzJ0JhIGpg8LfsPUIkxFnvo8IT+84gjw5VG037KeFRwIgMqi9ly0s9r/rn9RmLSwOUHwjIJG3RRQ1UcHcsLAMW9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9749},"readme":"# medusa-file-r2\n\nCloudflare R2 storage plugin for Medusa. This plugin also supports CSV exports and imports. R2 is S3-compatible object storage service by Cloudflare and has a 10GB/month forever-free tier.\n\nThis plugin is written in Typescript and uses ESBuild to create the bundle and files needed to be included in the `medusa.config.js` file.\n\n## Getting Started\n\n1. Create a Cloudflare account: If you don't have one, you can create one [here](https://dash.cloudflare.com/sign-up).\n2. Create a R2 bucket: Follow [this guide](https://developers.cloudflare.com/r2/get-started) to create a R2 bucket.\n3. Make the bucket public: Follow [this guide](https://developers.cloudflare.com/r2/data-access/public-buckets) to make the bucket public. While managed public access for your buckets through r2.dev cloudflare subdomain is relatively easy, it's preferred to use a custom domain as the managed r2.dev subdomain is rate-limited, custom domain also makes use of Cloudflare Cache to accelerate access to your R2 bucket.\n4. Obtain required credentials: You will need the following credentials to configure the plugin:\n   - `account_id`: Login to your Cloudflare account and go to the `R2` section. The `account_id` is the `Account ID` in the top right corner.\n   - `access_key` and `secret_key` - Follow [this guide](https://developers.cloudflare.com/r2/data-access/s3-api/tokens) to generate Access Key ID and Secret Access Key for your R2 bucket.\n   - `bucket`: The name of the R2 bucket you created.\n   - `public_url`: The public URL of the R2 bucket you created.\n5. Install `medusa-file-r2` plugin: Run the following command in your terminal:\n\n   ```bash\n   yarn add medusa-file-r2\n   ```\n\n6. Add the plugin to medusa.config.js: Add the following code to your medusa.config.js file:\n\n   ```js\n   const plugins = [\n     // other plugin configurations\n     {\n       resolve: \"medusa-file-r2\",\n       options: {\n         bucket: \"YOUR_R2_BUCKET_NAME\",\n         endpoint: \"https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com\",\n         access_key: \"YOUR_ACCESS_KEY\",\n         secret_key: \"YOUR_SECRET_KEY\",\n         public_url: \"YOUR_R2_BUCKET_PUBLIC_URL\",\n         // Optional options\n         // cache_control: \"max-age=31536000\",\n         // presigned_url_expires: 60 * 60, // 1 hour\n       },\n     },\n   ];\n   ```\n","gitHead":"ef6d1183bae567e14b250674b35358677aececa0","scripts":{"dev":"npm run bundle -- --watch","build":"npm run bundle","bundle":"esbuild src/services/** --outdir=services --format=cjs --target=esnext"},"_npmUser":{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},"repository":{"url":"git+https://github.com/Agilo/medusa-file-r2.git","type":"git"},"_npmVersion":"9.7.2","description":"Cloudflare R2 storage plugin for Medusa","directories":{},"_nodeVersion":"20.3.1","dependencies":{"aws-sdk":"^2.1572.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^10.0.0","eslint":"^8.57.0","esbuild":"^0.20.1","prettier":"^3.2.5","cross-env":"^7.0.3","typescript":"^5.4.2","@types/node":"^20.11.25","@types/multer":"^1.4.11","@types/aws-sdk":"^2.7.0","@medusajs/medusa":">=1.20.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.1.1","babel-preset-medusa-package":"^1.1.19","@typescript-eslint/eslint-plugin":"^7.1.1"},"peerDependencies":{"@medusajs/medusa":">=1.20.0"},"_npmOperationalInternal":{"tmp":"tmp/medusa-file-r2_1.1.0-0_1711107970532_0.05597829519454689","host":"s3://npm-registry-packages"}},"1.1.1-0":{"name":"@agilo/medusa-file-r2","version":"1.1.1-0","keywords":["medusa-plugin","medusa-file-plugin","cloudflare-r2"],"author":{"name":"Ante Primorac","email":"ante@agilo.co"},"license":"MIT","_id":"@agilo/medusa-file-r2@1.1.1-0","maintainers":[{"name":"ilimic","email":"ilimic1@gmail.com"},{"name":"josipmatichr","email":"josip@agilo.co"},{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},{"name":"alenvuletic","email":"alenvuletic@gmail.com"}],"homepage":"https://github.com/Agilo/medusa-file-r2#readme","bugs":{"url":"https://github.com/Agilo/medusa-file-r2/issues"},"dist":{"shasum":"d51e50bb8ac115263c2cfcb8060a1813b304863c","tarball":"https://registry.npmjs.org/@agilo/medusa-file-r2/-/medusa-file-r2-1.1.1-0.tgz","fileCount":3,"integrity":"sha512-lH064sRsEnk/uuKN5xUp10hb60nSBhIXtC0y/dftg40+FWyp0ix/923PS0PZvvB28UbRNBfYSauxzLLzxAPAUg==","signatures":[{"sig":"MEYCIQCXKttG953JWdp1OMJDGbGjT8iJapuAuU3tazoEXKugYAIhAI99H9Trs7H3UK0kxG9SLSJCen5ii+HBFKc6QTF2mjh1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9749},"readme":"# medusa-file-r2\n\nCloudflare R2 storage plugin for Medusa. This plugin also supports CSV exports and imports. R2 is S3-compatible object storage service by Cloudflare and has a 10GB/month forever-free tier.\n\nThis plugin is written in Typescript and uses ESBuild to create the bundle and files needed to be included in the `medusa.config.js` file.\n\n## Getting Started\n\n1. Create a Cloudflare account: If you don't have one, you can create one [here](https://dash.cloudflare.com/sign-up).\n2. Create a R2 bucket: Follow [this guide](https://developers.cloudflare.com/r2/get-started) to create a R2 bucket.\n3. Make the bucket public: Follow [this guide](https://developers.cloudflare.com/r2/data-access/public-buckets) to make the bucket public. While managed public access for your buckets through r2.dev cloudflare subdomain is relatively easy, it's preferred to use a custom domain as the managed r2.dev subdomain is rate-limited, custom domain also makes use of Cloudflare Cache to accelerate access to your R2 bucket.\n4. Obtain required credentials: You will need the following credentials to configure the plugin:\n   - `account_id`: Login to your Cloudflare account and go to the `R2` section. The `account_id` is the `Account ID` in the top right corner.\n   - `access_key` and `secret_key` - Follow [this guide](https://developers.cloudflare.com/r2/data-access/s3-api/tokens) to generate Access Key ID and Secret Access Key for your R2 bucket.\n   - `bucket`: The name of the R2 bucket you created.\n   - `public_url`: The public URL of the R2 bucket you created.\n5. Install `medusa-file-r2` plugin: Run the following command in your terminal:\n\n   ```bash\n   yarn add medusa-file-r2\n   ```\n\n6. Add the plugin to medusa.config.js: Add the following code to your medusa.config.js file:\n\n   ```js\n   const plugins = [\n     // other plugin configurations\n     {\n       resolve: \"medusa-file-r2\",\n       options: {\n         bucket: \"YOUR_R2_BUCKET_NAME\",\n         endpoint: \"https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com\",\n         access_key: \"YOUR_ACCESS_KEY\",\n         secret_key: \"YOUR_SECRET_KEY\",\n         public_url: \"YOUR_R2_BUCKET_PUBLIC_URL\",\n         // Optional options\n         // cache_control: \"max-age=31536000\",\n         // presigned_url_expires: 60 * 60, // 1 hour\n       },\n     },\n   ];\n   ```\n","gitHead":"330813ec8342db83fc300f4659c774fbdb11285d","scripts":{"dev":"npm run bundle -- --watch","build":"npm run bundle","bundle":"esbuild src/services/** --outdir=services --format=cjs --target=esnext"},"_npmUser":{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},"repository":{"url":"git+https://github.com/Agilo/medusa-file-r2.git","type":"git"},"_npmVersion":"9.7.2","description":"Cloudflare R2 storage plugin for Medusa","directories":{},"_nodeVersion":"20.3.1","dependencies":{"aws-sdk":"^2.1572.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^10.0.0","eslint":"^8.57.0","esbuild":"^0.20.1","prettier":"^3.2.5","cross-env":"^7.0.3","typescript":"^5.4.2","@types/node":"^20.11.25","@types/multer":"^1.4.11","@types/aws-sdk":"^2.7.0","@medusajs/medusa":">=1.20.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.1.1","babel-preset-medusa-package":"^1.1.19","@typescript-eslint/eslint-plugin":"^7.1.1"},"peerDependencies":{"@medusajs/medusa":">=1.20.0"},"_npmOperationalInternal":{"tmp":"tmp/medusa-file-r2_1.1.1-0_1711108747196_0.26604431618543956","host":"s3://npm-registry-packages"}},"1.1.2-0":{"name":"@agilo/medusa-file-r2","version":"1.1.2-0","keywords":["medusa-plugin","medusa-file-plugin","cloudflare-r2"],"author":{"name":"Ante Primorac","email":"ante@agilo.co"},"license":"MIT","_id":"@agilo/medusa-file-r2@1.1.2-0","maintainers":[{"name":"ilimic","email":"ilimic1@gmail.com"},{"name":"josipmatichr","email":"josip@agilo.co"},{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},{"name":"alenvuletic","email":"alenvuletic@gmail.com"}],"homepage":"https://github.com/Agilo/medusa-file-r2#readme","bugs":{"url":"https://github.com/Agilo/medusa-file-r2/issues"},"dist":{"shasum":"6043ed432c7e255f4653bff25a5e26305dcaa869","tarball":"https://registry.npmjs.org/@agilo/medusa-file-r2/-/medusa-file-r2-1.1.2-0.tgz","fileCount":3,"integrity":"sha512-kPHsW95u84nXL7G9iybPrpcblxvNxPM5wak5nnF1a0k9cCBQhsRUX514BAQjuDh9zBOm3rM6r/F9BY8A93WJkA==","signatures":[{"sig":"MEYCIQD2N7mO/iAuSgNMCoQblEDj9Eu5iG3U5XY/RCB3tkoufAIhALQjJ5HWyXMJBlh1PXIDkBtSn3TGiKriNlZdv5QaihZv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9802},"readme":"# medusa-file-r2\n\nCloudflare R2 storage plugin for Medusa. This plugin also supports CSV exports and imports. R2 is S3-compatible object storage service by Cloudflare and has a 10GB/month forever-free tier.\n\nThis plugin is written in Typescript and uses ESBuild to create the bundle and files needed to be included in the `medusa.config.js` file.\n\n## Getting Started\n\n1. Create a Cloudflare account: If you don't have one, you can create one [here](https://dash.cloudflare.com/sign-up).\n2. Create a R2 bucket: Follow [this guide](https://developers.cloudflare.com/r2/get-started) to create a R2 bucket.\n3. Make the bucket public: Follow [this guide](https://developers.cloudflare.com/r2/data-access/public-buckets) to make the bucket public. While managed public access for your buckets through r2.dev cloudflare subdomain is relatively easy, it's preferred to use a custom domain as the managed r2.dev subdomain is rate-limited, custom domain also makes use of Cloudflare Cache to accelerate access to your R2 bucket.\n4. Obtain required credentials: You will need the following credentials to configure the plugin:\n   - `account_id`: Login to your Cloudflare account and go to the `R2` section. The `account_id` is the `Account ID` in the top right corner.\n   - `access_key` and `secret_key` - Follow [this guide](https://developers.cloudflare.com/r2/data-access/s3-api/tokens) to generate Access Key ID and Secret Access Key for your R2 bucket.\n   - `bucket`: The name of the R2 bucket you created.\n   - `public_url`: The public URL of the R2 bucket you created.\n5. Install `medusa-file-r2` plugin: Run the following command in your terminal:\n\n   ```bash\n   yarn add medusa-file-r2\n   ```\n\n6. Add the plugin to medusa.config.js: Add the following code to your medusa.config.js file:\n\n   ```js\n   const plugins = [\n     // other plugin configurations\n     {\n       resolve: \"medusa-file-r2\",\n       options: {\n         bucket: \"YOUR_R2_BUCKET_NAME\",\n         endpoint: \"https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com\",\n         access_key: \"YOUR_ACCESS_KEY\",\n         secret_key: \"YOUR_SECRET_KEY\",\n         public_url: \"YOUR_R2_BUCKET_PUBLIC_URL\",\n         // Optional options\n         // cache_control: \"max-age=31536000\",\n         // presigned_url_expires: 60 * 60, // 1 hour\n       },\n     },\n   ];\n   ```\n","gitHead":"8e1b4c5f1207c65faae685e8995444afd1787ea2","scripts":{"dev":"npm run bundle -- --watch","build":"npm run bundle","bundle":"esbuild src/services/** --outdir=services --format=cjs --target=esnext"},"_npmUser":{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},"repository":{"url":"git+https://github.com/Agilo/medusa-file-r2.git","type":"git"},"_npmVersion":"9.7.2","description":"Cloudflare R2 storage plugin for Medusa","directories":{},"_nodeVersion":"20.3.1","dependencies":{"aws-sdk":"^2.1572.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^10.0.0","eslint":"^8.57.0","esbuild":"^0.20.1","prettier":"^3.2.5","cross-env":"^7.0.3","typescript":"^5.4.2","@types/node":"^20.11.25","@types/multer":"^1.4.11","@types/aws-sdk":"^2.7.0","@medusajs/medusa":">=1.20.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.1.1","babel-preset-medusa-package":"^1.1.19","@typescript-eslint/eslint-plugin":"^7.1.1"},"peerDependencies":{"@medusajs/medusa":">=1.20.0"},"_npmOperationalInternal":{"tmp":"tmp/medusa-file-r2_1.1.2-0_1711109229569_0.32373537742856073","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@agilo/medusa-file-r2","version":"1.0.0","keywords":["medusa-plugin","medusa-file-plugin","cloudflare-r2"],"author":{"name":"Ante Primorac","email":"ante@agilo.co"},"license":"MIT","_id":"@agilo/medusa-file-r2@1.0.0","maintainers":[{"name":"ilimic","email":"ilimic1@gmail.com"},{"name":"josipmatichr","email":"josip@agilo.co"},{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},{"name":"alenvuletic","email":"alenvuletic@gmail.com"}],"homepage":"https://github.com/Agilo/medusa-file-r2#readme","bugs":{"url":"https://github.com/Agilo/medusa-file-r2/issues"},"dist":{"shasum":"31a1a90a6a2981323cde6eb7ff0a1d9ec8a066ac","tarball":"https://registry.npmjs.org/@agilo/medusa-file-r2/-/medusa-file-r2-1.0.0.tgz","fileCount":3,"integrity":"sha512-IHeAPBImg1ZLpmshuaciI2fIIPm0h7ah7k+uzSCNaR7NuCj125yxKtdJ+Z+B1AjNcev2Alvhnq756DcmAsvo4g==","signatures":[{"sig":"MEUCIQCvjKgMc9WhXnxvq+nA4J5eTaKJvhNMBUS8WVX4NpOB4gIgP8cCqIXUsKry6JZow6Gvz64/N7brcDndUyilOoP7WQg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9928},"gitHead":"7515bf460d9551580da8856c66fcaf9b3123dc14","scripts":{"dev":"npm run bundle -- --watch","build":"npm run bundle","bundle":"esbuild src/services/** --outdir=services --format=cjs --target=esnext","prepublish":"npm run build"},"_npmUser":{"name":"anteprimorac","email":"anteprimorachr@gmail.com"},"repository":{"url":"git+https://github.com/Agilo/medusa-file-r2.git","type":"git"},"_npmVersion":"9.7.2","description":"Cloudflare R2 storage plugin for Medusa","directories":{},"_nodeVersion":"20.3.1","dependencies":{"aws-sdk":"^2.1572.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.0.0","eslint":"^8.57.0","esbuild":"^0.20.1","prettier":"^3.2.5","cross-env":"^7.0.3","typescript":"^5.4.2","@types/node":"^20.11.25","@types/multer":"^1.4.11","@types/aws-sdk":"^2.7.0","@medusajs/medusa":">=1.20.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.1.1","babel-preset-medusa-package":"^1.1.19","@typescript-eslint/eslint-plugin":"^7.1.1"},"peerDependencies":{"@medusajs/medusa":">=1.20.0"},"_npmOperationalInternal":{"tmp":"tmp/medusa-file-r2_1.0.0_1711109735855_0.2572620059277535","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-03-07T12:12:39.547Z","modified":"2026-05-04T12:25:09.361Z","1.0.0-0":"2024-03-07T12:12:39.763Z","1.1.0-0":"2024-03-22T11:46:10.681Z","1.1.1-0":"2024-03-22T11:59:07.323Z","1.1.2-0":"2024-03-22T12:07:09.720Z","1.0.0":"2024-03-22T12:15:36.010Z"},"bugs":{"url":"https://github.com/Agilo/medusa-file-r2/issues"},"author":{"name":"Ante Primorac","email":"ante@agilo.co"},"license":"MIT","homepage":"https://github.com/Agilo/medusa-file-r2#readme","keywords":["medusa-plugin","medusa-file-plugin","cloudflare-r2"],"repository":{"url":"git+https://github.com/Agilo/medusa-file-r2.git","type":"git"},"description":"Cloudflare R2 storage plugin for Medusa","maintainers":[{"email":"anteprimorachr@gmail.com","name":"anteprimorac"},{"email":"josip@agilo.co","name":"josipmatichr"}],"readme":"# medusa-file-r2\n\nCloudflare R2 storage plugin for Medusa. This plugin also supports CSV exports and imports. R2 is S3-compatible object storage service by Cloudflare and has a 10GB/month forever-free tier.\n\nThis plugin is written in Typescript and uses ESBuild to create the bundle and files needed to be included in the `medusa.config.js` file.\n\n## Getting Started\n\n1. Create a Cloudflare account: If you don't have one, you can create one [here](https://dash.cloudflare.com/sign-up).\n2. Create a R2 bucket: Follow [this guide](https://developers.cloudflare.com/r2/get-started) to create a R2 bucket.\n3. Make the bucket public: Follow [this guide](https://developers.cloudflare.com/r2/data-access/public-buckets) to make the bucket public. While managed public access for your buckets through r2.dev cloudflare subdomain is relatively easy, it's preferred to use a custom domain as the managed r2.dev subdomain is rate-limited, custom domain also makes use of Cloudflare Cache to accelerate access to your R2 bucket.\n4. Obtain required credentials: You will need the following credentials to configure the plugin:\n   - `account_id`: Login to your Cloudflare account and go to the `R2` section. The `account_id` is the `Account ID` in the top right corner.\n   - `access_key` and `secret_key` - Follow [this guide](https://developers.cloudflare.com/r2/data-access/s3-api/tokens) to generate Access Key ID and Secret Access Key for your R2 bucket.\n   - `bucket`: The name of the R2 bucket you created.\n   - `public_url`: The public URL of the R2 bucket you created.\n5. Install `medusa-file-r2` plugin: Run the following command in your terminal:\n\n   ```bash\n   yarn add medusa-file-r2\n   ```\n\n6. Add the plugin to medusa.config.js: Add the following code to your medusa.config.js file:\n\n   ```js\n   const plugins = [\n     // other plugin configurations\n     {\n       resolve: \"medusa-file-r2\",\n       options: {\n         bucket: \"YOUR_R2_BUCKET_NAME\",\n         endpoint: \"https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com\",\n         access_key: \"YOUR_ACCESS_KEY\",\n         secret_key: \"YOUR_SECRET_KEY\",\n         public_url: \"YOUR_R2_BUCKET_PUBLIC_URL\",\n         // Optional options\n         // cache_control: \"max-age=31536000\",\n         // presigned_url_expires: 60 * 60, // 1 hour\n       },\n     },\n   ];\n   ```\n","readmeFilename":"README.md"}