@@ -9,25 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010### Added
1111
12- - ` hotdata.uploads.UploadsApi ` (the default ` hotdata.UploadsApi ` ) gains
13- ` upload_file(path, ...) ` , a transparent direct-to-storage upload that
14- orchestrates the presigned flow end to end: it opens a session
15- (` POST /v1/uploads ` ), ` PUT ` s the bytes ** straight to object storage** (a single
16- ` PUT ` for a small file, concurrent part ` PUT ` s for a large one), and finalizes
17- (` POST /v1/uploads/{id}/finalize ` ), returning the ` FinalizeUploadResponse ` . The
12+ - ` hotdata.UploadsApi ` gains ` upload_file(source, ...) ` , a transparent
13+ direct-to-storage upload. Give it a file path, raw ` bytes ` , or a seekable
14+ binary file object and it opens an upload session, sends the data ** straight
15+ to object storage** (a single request for a small file, concurrent multipart
16+ for a large one), and finalizes — returning the ` FinalizeUploadResponse ` . Your
1817 bytes never round-trip through the API. Supports a progress callback, an
1918 auto-scaled (or caller-set) part size, bounded concurrency with a peak-memory
20- budget, and idempotent per-part retry (tunable via ` part_retry ` ). Storage
21- ` PUT ` s go through a dedicated, header-isolated pool so no SDK auth/workspace
22- headers reach object storage. Failures surface as a typed hierarchy under
23- ` UploadError ` : ` StorageError ` (non-2xx from storage), ` StorageTransportError `
24- (transport failure before any response), ` MissingETagError ` ,
25- ` MalformedSessionError ` , and ` SizeLimitError ` . ` upload_file ` accepts a path,
26- raw ` bytes ` , or a seekable binary file object.
27- - ` hotdata.uploads.UploadsApi.upload_stream ` uploads an arbitrary byte source
28- (` bytes ` or a binary file object, streamed without buffering) to the legacy
29- ` POST /v1/files ` endpoint — the fallback when presigned uploads are
30- unsupported or the source is a non-seekable stream.
19+ budget, and idempotent per-part retry (tunable via ` part_retry ` ). Failures
20+ raise a typed hierarchy under ` UploadError ` : ` StorageError ` ,
21+ ` StorageTransportError ` , ` MissingETagError ` , ` MalformedSessionError ` , and
22+ ` SizeLimitError ` .
23+ - ` hotdata.UploadsApi.upload_stream ` uploads ` bytes ` or a binary stream
24+ (streamed without buffering) in a single request — the fallback for when
25+ direct-to-storage uploads aren't available or the source isn't seekable.
3126
3227### Changed
3328
0 commit comments