The video tutorial demonstrates how to upload files using the Hono framework on Cloudflare workers and connect to R2 Cloudflare storage. The methodology presented includes:
- Generate a template using npm create and Hono latest
- Rename index.ts to tsx for inline JSX support
- Configure a form with method post, action upload, and encoding type multiplatform data
- Create a Handler for the post request
- Use R2 Cloudflare storage by creating a bucket through Wrangler
- Add bindings for the bucket in the app
- Upload files to the bucket using the Hono R2 upload function
- Modify the rang.toml file to connect to the bucket in the local development environment
- Deploy the worker to Cloudflare and access the uploaded files
- Consider using specific tools for images on Cloudflare
### Methodology
- Generate a template using npm create and Hono latest
- Rename index.ts to tsx for inline JSX support
- Configure a form with method post, action upload, and encoding type multiplatform data
- Create a Handler for the post request
- Use R2 Cloudflare storage by creating a bucket through Wrangler
- Add bindings for the bucket in the app
- Upload files to the bucket using the Hono R2 upload function
- Modify the rang.toml file to connect to the bucket in the local development environment
- Deploy the worker to Cloudflare and access the uploaded files
- Consider using specific tools for images on Cloudflare
### Speakers
- Not specified
Notable Quotes
—
03:08
— « console.log um uploading file to R2 and then we'll put our uploading logic inside.
»