{"id":25847353,"url":"https://github.com/learexx/r2-bucket-uploader","last_synced_at":"2026-02-27T05:01:03.510Z","repository":{"id":278960142,"uuid":"935333336","full_name":"LeaReXx/r2-bucket-uploader","owner":"LeaReXx","description":"Cloudflare R2 multipart File Uploader to bucket, Demo example for NextJS 15","archived":false,"fork":false,"pushed_at":"2025-02-23T08:30:50.000Z","size":5494,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T06:42:16.481Z","etag":null,"topics":["blob-storage","chunked-uploads","cloudflare","file-upload","multipart","multipart-uploads","nextjs","object-storage","s3","s3-storage"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LeaReXx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-19T09:23:36.000Z","updated_at":"2025-06-30T12:15:32.000Z","dependencies_parsed_at":"2025-07-27T06:39:01.751Z","dependency_job_id":"1df733c9-93fb-4966-b43d-49984a5e382c","html_url":"https://github.com/LeaReXx/r2-bucket-uploader","commit_stats":null,"previous_names":["learexx/r2-bucket-uploader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LeaReXx/r2-bucket-uploader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeaReXx%2Fr2-bucket-uploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeaReXx%2Fr2-bucket-uploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeaReXx%2Fr2-bucket-uploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeaReXx%2Fr2-bucket-uploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeaReXx","download_url":"https://codeload.github.com/LeaReXx/r2-bucket-uploader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeaReXx%2Fr2-bucket-uploader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29885799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blob-storage","chunked-uploads","cloudflare","file-upload","multipart","multipart-uploads","nextjs","object-storage","s3","s3-storage"],"created_at":"2025-03-01T10:18:52.756Z","updated_at":"2026-02-27T05:01:03.495Z","avatar_url":"https://github.com/LeaReXx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare R2 bucket Multipart File Uploader \u003csup\u003eNext JS 15\u003c/sup\u003e\n\n\nA minimal and flexible uploader component tailored for Cloudflare R2 bucket. It supports multipart upload and was tested with files up to 1 GB size.\n\n- R2 blob storage support (or any S3 API compatible storage)\n- Tested with 1GB files\n- Drag and drop\n- Completely server side\n- Multipart upload support\n- Customizable\n- No Complexity\n- Built With NextJs 15\n\n![Demo](public/Demo.png)\n\nThe intent of this repo is to provide simple to use and simple to copy and paste file uploader component for Next.js.\n\nThe components were written mainly to be used with R2 but any blob storage with a S3-compatible API should work with just a few tweaks.\n\nGood for simple projects or for bootstrapping more complex file-uploading workflows when customized.\n\n# Setup\n\n### Install the dependencies\n\nOn your project, run:\n\n```bash\nnpm install\n```\n\n### Set the environment variables\n\nIn your `.env` file, set the following environment variables:\n\n```bash\nR2_ENDPOINT=\nR2_ACCESS_KEY=\nR2_SECRET_KEY=\nR2_BUCKET_NAME=\n```\n\nThe values should be available from the R2 management dashboard on Cloudflare.\n\n### Set the CORS settings for the R2 bucket\n\nCreate the following CORS settings in order to make the upload components work with your bucket:\n\n```json\n[\n  {\n    \"AllowedOrigins\": [\"*\"],\n    \"AllowedMethods\": [\"GET\", \"PUT\"],\n    \"AllowedHeaders\": [\"Authorization\", \"content-type\"],\n    \"ExposeHeaders\": [\"ETag\", \"Location\"],\n    \"MaxAgeSeconds\": 3000\n  },\n  {\n    \"AllowedOrigins\": [\"*\"],\n    \"AllowedMethods\": [\"GET\"],\n    \"AllowedHeaders\": [\"*\"]\n  }\n]\n```\n\nOptionally, to increase security you can also customize the `AllowedOrigins` properties.\n\n### Run\n\nRun the development server\n\n```bash\nnpm run dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearexx%2Fr2-bucket-uploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flearexx%2Fr2-bucket-uploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearexx%2Fr2-bucket-uploader/lists"}