@hautechai/sdk 2.41.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.d.mts +174 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,6 +91,12 @@ Docs about how to use the SDK are available [here](https://docs.hautech.ai/)
|
|
|
91
91
|
- If you pass a `Blob` in the browser, some environments may set the filename to a default value (e.g., `"blob"`). To control the filename when using a `Blob`, wrap it in an object with explicit metadata on server-side, or construct a `File` from the `Blob`.
|
|
92
92
|
- In Node.js, when you pass a string path (e.g., `/path/to/image.png`), the SDK sets the multipart filename to the basename of the path (e.g., `image.png`). You can also pass an object with `{ stream, filename, contentType }` to control metadata explicitly.
|
|
93
93
|
|
|
94
|
+
You can also expire uploads automatically by specifying a TTL when finalizing image uploads:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
await sdk.images.createFromFile('/path/to/image.png', { ttlSeconds: 3600 });
|
|
98
|
+
```
|
|
99
|
+
|
|
94
100
|
## Development
|
|
95
101
|
|
|
96
102
|
### Prerequisites
|