Skip to content

Commit ad69d74

Browse files
committed
chore: PR comments
1 parent 39c2015 commit ad69d74

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/sdks/tigris/client-uploads.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import { upload } from "@tigrisdata/storage/client";
2929
- `body`: (Required) A blob object as File or Blob
3030
- `options`: (Optional) A JSON object with the following optional parameters:
3131

32+
#### `options`
33+
3234
| **Parameter** | **Required** | **Values** |
3335
| ---------------- | ------------ | ----------------------------------------------------------------------------------------------------------- |
3436
| url | No | The URL to upload the file to. |

docs/sdks/tigris/examples.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ to trigger a download or display the file in the browser.
1919
<TabItem value="server" label="Server" default>
2020

2121
```ts
22-
// app/api/avatar.ts
22+
// app/api/avatar/route.ts
2323
import { NextRequest, NextResponse } from "next/server";
2424
import { get } from "@tigrisdata/storage";
2525

@@ -90,7 +90,7 @@ To trigger a download, set the `contentDisposition` option to `attachment`.
9090
<TabItem value="server" label="Server" default>
9191

9292
```ts
93-
// app/api/upload.ts
93+
// app/api/upload/route.ts
9494
import { NextRequest, NextResponse } from "next/server";
9595
import { put } from "@tigrisdata/storage";
9696

@@ -142,11 +142,11 @@ export default function Upload() {
142142

143143
### Client Uploads
144144

145-
Amongst all the other great features of Tigris, free egress fees is another
146-
example of what makes us stand out from other providers. We care about the
147-
bandwidth costs and we want to make it as cheap as possible for you to use
148-
Tigris. That's why we've made it so that you can upload files directly to Tigris
149-
from the client side.
145+
Tigris does not charge egress fees, but your hosting provider may charge them
146+
for user uploads to Tigris. We care about your bandwidth costs, so we made it
147+
easy to have the server and client work together to upload things. This lets you
148+
give a presigned URL to the client and then have the client upload to Tigris
149+
instead of your server needing to be in the middle.
150150

151151
We leverage the
152152
[presigned URLs](/docs/sdks/tigris/using-sdk#presigning-an-object) features to
@@ -156,7 +156,7 @@ allow you to upload files directly to Tigris from the client side.
156156
<TabItem value="server" label="Server" default>
157157

158158
```ts
159-
// app/api/signed.ts
159+
// app/api/upload/route.ts
160160
import { NextRequest, NextResponse } from "next/server";
161161
import { getPresignedUrl } from "@tigrisdata/storage";
162162

0 commit comments

Comments
 (0)