https://github.com/rayyannafees/r2upload
https://github.com/rayyannafees/r2upload
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rayyannafees/r2upload
- Owner: RayyanNafees
- Created: 2025-03-20T22:11:33.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-20T22:34:14.000Z (10 months ago)
- Last Synced: 2025-04-01T09:53:43.025Z (10 months ago)
- Language: TypeScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# R2 uploader Drag & Drop
This is the boilerplate code for drag and drop file upload functionality on Cloudflare R2 object storage
## Tech Stack
`client`
- React
- Sonner Toast
- TailwindCSS
- react-dropzone
`server`
- Deno + aws4fetch
## Setup
1. Go to cloudflare and create an R2 bucket (preferrable with `amulet-pdfs` name)
2. Go to its settings then CORS policy and then set the CORS policy content to that of [r2cors.json](/server/r2cors.json) file in server folder
## Running
1. Deploy the Deno URL signer code in `server` directory to some Deno Playground](dash.deno.dev/playground) or [Val](https://val.town)
2. change the link in [upload.ts](/upload.ts) of that of the URL signer u just uploaded