{"id":15175419,"url":"https://github.com/sazumivicky/uploader-r2","last_synced_at":"2026-02-28T05:54:49.332Z","repository":{"id":254701243,"uuid":"847286783","full_name":"SazumiVicky/uploader-r2","owner":"SazumiVicky","description":"This project is a web-based file uploader built with Node.js, Express, and AWS S3 | Cloudflare r2. It allows users to upload files with a size limit of 50MB and provides a simple interface for managing uploads.","archived":false,"fork":false,"pushed_at":"2024-08-25T11:50:35.000Z","size":356,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-17T19:18:57.714Z","etag":null,"topics":["aws","aws-s3","cloudflare","express","r2","sazumi","sazumiviki","uploader"],"latest_commit_sha":null,"homepage":"https://sazumi.moe","language":"JavaScript","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/SazumiVicky.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}},"created_at":"2024-08-25T11:49:42.000Z","updated_at":"2024-11-22T02:45:15.000Z","dependencies_parsed_at":"2024-08-25T14:06:02.781Z","dependency_job_id":null,"html_url":"https://github.com/SazumiVicky/uploader-r2","commit_stats":null,"previous_names":["sazumivicky/uploader-r2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SazumiVicky%2Fuploader-r2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SazumiVicky%2Fuploader-r2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SazumiVicky%2Fuploader-r2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SazumiVicky%2Fuploader-r2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SazumiVicky","download_url":"https://codeload.github.com/SazumiVicky/uploader-r2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372581,"owners_count":21419719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws","aws-s3","cloudflare","express","r2","sazumi","sazumiviki","uploader"],"created_at":"2024-09-27T12:23:54.496Z","updated_at":"2026-02-28T05:54:49.213Z","avatar_url":"https://github.com/SazumiVicky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS S3 | Cloudflare r2 - UPLOADER\n\nThis project is a web-based file uploader built with Node.js, Express, and AWS S3 | Cloudflare r2. It allows users to upload files with a size limit of 50MB and provides a simple interface for managing uploads.\n\n## Features\n\n- File upload with a size limit of 50MB\n- File storage on AWS S3 | Cloudflare r2\n- Simple and clean user interface\n- Donation popup for user contributions\n\n## Technologies Used\n\n- Node.js\n- Express\n- AWS S3 | Cloudflare r2\n- Multer\n- HTML/CSS/JavaScript\n\n## Installation\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/SazumiVicky/uploader-r2.git\n    cd uploader-r2\n    ```\n\n2. Install the dependencies:\n    ```sh\n    npm install --save\n    ```\n\n3. Create a `.env` file in the root directory and add your AWS S3 credentials:\n    ```env\n    AWS_ACCESS_KEY_ID=\n    AWS_SECRET_ACCESS_KEY=\n    AWS_REGION=auto\n    CLOUDFLARE_ENDPOINT=\n    BUCKET_NAME=\n    ```\nFull documentation here [AWS S3 | Cloudflare r2](https://developers.cloudflare.com/r2/examples/aws/)\n\n4. Start the server:\n    ```sh\n    npm start\n    ```\n\n5. Open your browser and navigate to `http://localhost:3000`.\n\n## Usage\n\n1. Select a file to upload using the file input.\n2. Click the \"Upload\" button to start the upload process.\n3. Wait for the upload to complete and see the status message.\n4. The uploaded file URL will be displayed in the upload history.\n\n## File Structure\n\n- `public/`: Contains static files (HTML, CSS, JavaScript)\n- `server.js`: Main server file\n- `Dockerfile`: Docker configuration\n- `package.json`: Project dependencies and scripts\n\n## Api Docs Example\n\n```js\nconst fetch = require('node-fetch');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nasync function sazumiCdn(filePath) {\n  const formData = new FormData();\n  formData.append('fileInput', fs.createReadStream(filePath));\n\n  try {\n    const response = await fetch('https://localhost:3000/upload', {\n      method: 'POST',\n      body: formData\n    });\n\n    if (response.ok) {\n      const fileUrl = await response.json(); // Change from response.text() to response.json()\n      console.log('Succesfully:', fileUrl);\n    } else {\n      const errorResponse = await response.json(); // Change from response.statusText to response.json()\n      console.error('oops something went wrong:', errorResponse);\n    }\n  } catch (error) {\n    console.error('oops something went wrong:', error.message);\n  }\n}\n\n// Example usage:\nsazumiCdn('/path/to/your/file.jpg');\n```\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Author\n\nDeveloped by Sazumi Viki\n\n- [Instagram](https://www.instagram.com/moe.sazumiviki)\n- [GitHub](https://github.com/sazumivicky)\n- [Website](https://sazumi.moe)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsazumivicky%2Fuploader-r2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsazumivicky%2Fuploader-r2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsazumivicky%2Fuploader-r2/lists"}