* Builds the canonical URI for an object key. * * AWS (virtual-hosted-style): `/{key}` — the bucket lives in the host. * Custom endpoint (path-style): `/{bucket}/{key}` — the bucket is the first * path segment. Both the bucket and key are percent-encoded per AWS UriEncode * rules while preservi
(ctx: S3Context, key: string)
| 235 | * rules while preserving `/` separators via {@link encodeS3PathComponent}. |
| 236 | */ |
| 237 | function buildObjectPath(ctx: S3Context, key: string): string { |
| 238 | const encodedKey = encodeS3PathComponent(key) |
| 239 | return ctx.endpoint ? `/${encodeS3PathComponent(ctx.bucket)}/${encodedKey}` : `/${encodedKey}` |
| 240 | } |
| 241 | |
| 242 | /** |
| 243 | * Builds the canonical URI for a bucket-level (ListObjectsV2) request. |
no test coverage detected