diff --git a/docs/api.md b/docs/api.md index e426936a..5aa5fec8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -624,6 +624,12 @@ Run responses may also include: - `DELETE /api/object-storage/buckets/:name` - `POST /api/object-storage/objects` - `POST /api/object-storage/objects/upload` +- `POST /api/object-storage/uploads/presign-put` +- `POST /api/object-storage/uploads/batch/prepare` +- `POST /api/object-storage/uploads/multipart/initiate` +- `POST /api/object-storage/uploads/multipart/part-url` +- `POST /api/object-storage/uploads/multipart/complete` +- `POST /api/object-storage/uploads/multipart/abort` - `PATCH /api/object-storage/objects` - `DELETE /api/object-storage/objects` @@ -631,6 +637,8 @@ Run responses may also include: `GET` and `HEAD /api/object-storage/content` support browser byte-range preview requests. When a request sends a single `Range: bytes=-` header, the API proxies a ranged BOS read and returns `206 Partial Content`, `Content-Range`, `Accept-Ranges: bytes`, and a bounded `Content-Length` without reading the full object into API memory. Video preview components request only metadata up front and add `?transcode=browser` for browser-compatible MP4 previews when needed. +`POST /api/object-storage/uploads/batch/prepare?connectionId=` prepares up to 5000 directory-upload entries before the browser transfers bytes. The payload contains `bucket`, optional `prefix`, `conflictPolicy` (`overwrite`, `skip`, or `error`), and `items` with `relativePath`, `kind`, `sizeBytes`, and `contentType`. Relative paths are normalized and traversal segments are rejected. File entries resolve to their destination key; directory entries resolve to `/.keep`. The response gives each item an `upload`, `create_placeholder`, `skip`, or `conflict` action plus aggregate counts. The browser then reuses the existing presigned single-file or multipart upload path with four-file concurrency, so the API does not proxy directory file bodies. + ## Worker API Base path: `/worker-api` diff --git a/docs/production-readiness.md b/docs/production-readiness.md index fe1b17cf..2f8418e7 100644 --- a/docs/production-readiness.md +++ b/docs/production-readiness.md @@ -43,6 +43,7 @@ This note tracks the production-facing safeguards that must stay true for Drobod - Object-storage JSON object creation is capped at 4 MiB. - Browser multipart uploads stream to BOS and are capped at 2 GiB. +- Directory uploads keep browser `webkitRelativePath` values, prepare at most 5000 files/placeholders per batch, and upload four files concurrently through the same presigned direct/multipart path. Conflict policy is explicit (`overwrite`, `skip`, or stop with `error`), failed files can be retried independently, and explicitly listed empty directories are preserved as `.keep` objects because browser directory inputs do not expose truly empty directories. - Large inline object reads use preview or presigned URL behavior instead of loading full objects into API memory. - Browser video previews are lazy-loaded in monitoring, artifact preview, and object-storage browsing surfaces. The UI does not attach the `