Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions fern/products/sdks/overview/typescript/changelog/2025-10-14.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## 3.9.0
**`(feat):`** Add support for the `Uploadable.FromPath` and `Uploadable.WithMetadata` types to upload files with metadata to multipart-form endpoints.

Users can configure metadata when uploading a file to a multipart-form upload endpoint using the `Uploadable.WithMetadata` type:
```typescript
import { createReadStream } from "fs";

await client.upload({
file: {
data: createReadStream("path/to/file"),
filename: "my-file",
contentType: "audio/mpeg",
},
otherField: "other value",
});
```
The `filename`, `contentType`, and `contentLength` properties are optional.

Alternatively, users can use the `Uploadable.FromPath` type to upload directly from a file path:
```typescript
await client.upload({
file: {
path: "path/to/file",
filename: "my-file",
contentType: "audio/mpeg",
},
otherField: "other value",
});
```

The metadata is used to set the `Content-Type` and `Content-Disposition` headers. If not provided, the client will attempt to determine them automatically.
```