Multipart Form Data
Fern generated SDKs natively support uploading files and other media through multipart form data uploads.
TypeScript
The TypeScript SDK will accept either a fs.readStream
, fs.ReadableStream
or a
Blob
for the file types. This is to ensure that the file upload functionality
can be used in the browser, Node.js and edge runtimes like Next.js and Cloudflare.
This is what the SDK method signature would look like:
DocumentClient.ts
and how a user would consume it