Skip to content

Commit cf1723f

Browse files
committed
docs: tree node size/checksum reflect the original form under originals=true
1 parent 61058f6 commit cf1723f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

docs/useCases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ _See [use case](../src/datasets/domain/useCases/ListDatasetTreeNode.ts) implemen
16541654

16551655
`datasetId` can be a numeric id or a persistent identifier string. `datasetVersionId` is optional and defaults to `DatasetNotNumberedVersion.LATEST`.
16561656

1657-
Other optional parameters: `cursor` (opaque, from a previous response), `include` (`'all' | 'folders' | 'files'`, default `'all'`), `order` (`'NameAZ' | 'NameZA'`, default `'NameAZ'`), `includeDeaccessioned` (default `false`), and `originals` (when `true`, the per-file `downloadUrl` carries `?format=original`).
1657+
Other optional parameters: `cursor` (opaque, from a previous response), `include` (`'all' | 'folders' | 'files'`, default `'all'`), `order` (`'NameAZ' | 'NameZA'`, default `'NameAZ'`), `includeDeaccessioned` (default `false`), and `originals` (when `true`, ingested tabular files are reported in their original-upload form: the per-file `downloadUrl` carries `?format=original`, and `checksum` and `size` reflect the saved original instead of the converted TSV).
16581658

16591659
For published, non-deaccessioned versions the underlying API emits `ETag` + `Cache-Control: private, immutable` headers. The `private` directive keeps responses out of shared proxy caches because the route is auth-required; the browser's own cache still benefits from `immutable`. Drafts and deaccessioned versions don't.
16601660

src/datasets/domain/models/FileTreeNode.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ export interface FileTreeFileNode {
4040
id: number
4141
name: string
4242
path: string
43+
/**
44+
* File size in bytes. For ingested tabular files this is the
45+
* served-form (converted TSV) size by default; when the listing was
46+
* requested with `originals=true` it is the saved original's size,
47+
* matching the bytes `downloadUrl` then serves.
48+
*/
4349
size: number
4450
contentType?: string
4551
access?: 'public' | 'restricted' | 'embargoed'

0 commit comments

Comments
 (0)