Skip to content

Conversation

@riderx
Copy link
Contributor

@riderx riderx commented Nov 4, 2025

This Pr adds a exemple of implementing TUS protocole with Hono and clouflare workers, r2 and durable object


## Installation

```bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the code-group?

::: code-group

```sh [npm]
npm install @capgo/hono-r2-tus-uploader
```

```sh [bun]
bun add @capgo/hono-r2-tus-uploader
```

:::

Will be rendered:

CleanShot 2025-11-04 at 17 55 19@2x


## Configuration

First, configure your R2 bucket and Durable Object bindings in `wrangler.toml`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding a wrangler.jsonc example?

text: 'Cloudflare Durable Objects',
link: '/examples/cloudflare-durable-objects',
},
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put the link here?

CleanShot 2025-11-04 at 17 57 36@2x

"TUS" is interesting and useful, but it has lower priority than "Cloudflare Testing".

The diff:

diff --git a/.vitepress/config.ts b/.vitepress/config.ts
index 1adf1e0..f6448df 100644
--- a/.vitepress/config.ts
+++ b/.vitepress/config.ts
@@ -303,10 +303,6 @@ export const sidebarsExamples = (): DefaultTheme.SidebarItem[] => [
         text: 'Cloudflare Durable Objects',
         link: '/examples/cloudflare-durable-objects',
       },
-      {
-        text: 'Cloudflare R2 TUS Upload',
-        link: '/examples/cloudflare-r2-tus-upload',
-      },
       {
         text: 'Cloudflare Queue',
         link: '/examples/cloudflare-queue',
@@ -315,6 +311,10 @@ export const sidebarsExamples = (): DefaultTheme.SidebarItem[] => [
         text: 'Cloudflare Testing',
         link: '/examples/cloudflare-vitest',
       },
+      {
+        text: 'Cloudflare R2 TUS Upload',
+        link: '/examples/cloudflare-r2-tus-upload',
+      },
       {
         text: 'Remix',
         link: '/examples/with-remix',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants