{"id":37651968,"url":"https://github.com/stac-extensions/file","last_synced_at":"2026-01-16T11:34:54.241Z","repository":{"id":42383633,"uuid":"343855284","full_name":"stac-extensions/file","owner":"stac-extensions","description":"Specifies file-related details such as size, data type and checksum for assets and links in STAC.","archived":false,"fork":false,"pushed_at":"2022-12-21T16:08:58.000Z","size":36,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-01-27T16:54:54.260Z","etag":null,"topics":["file","stac"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stac-extensions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-02T17:22:55.000Z","updated_at":"2023-10-25T16:30:04.000Z","dependencies_parsed_at":"2023-01-30T04:15:38.614Z","dependency_job_id":null,"html_url":"https://github.com/stac-extensions/file","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"stac-extensions/template","purl":"pkg:github/stac-extensions/file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Ffile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Ffile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Ffile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Ffile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stac-extensions","download_url":"https://codeload.github.com/stac-extensions/file/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-extensions%2Ffile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file","stac"],"created_at":"2026-01-16T11:34:54.174Z","updated_at":"2026-01-16T11:34:54.226Z","avatar_url":"https://github.com/stac-extensions.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Info Extension Specification\n\n- **Title:** File Info\n- **Identifier:** \u003chttps://stac-extensions.github.io/file/v2.1.0/schema.json\u003e\n- **Field Name Prefix:** file\n- **Scope:** Item, Catalog, Collection\n- **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Stable\n- **Owner**: @m-mohr\n- **History**: [Prior to March 2nd 2021](https://github.com/radiantearth/stac-spec/commits/4a841605ad83a16f45fcb88ed90117d6c77a7f04/extensions/file)\n\nProvides a way to specify file related details such as checksum, data type and size for assets in\n[STAC Items](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md),\n[STAC Catalogs](https://github.com/radiantearth/stac-spec/blob/master/catalog-spec/catalog-spec.md), as well as\n[STAC Collections](https://github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md) that implement collection-level assets.\n\n- Examples:\n  - [Item example](examples/item.json): Shows the basic usage of the extension in a STAC Item\n  - [Catalog example](examples/catalog.json): Shows the basic usage of the extension in a STAC Catalog\n  - [Collection example](examples/collection.json): Shows the basic usage of the extension in a STAC Collection\n- [JSON Schema](json-schema/schema.json)\n- [Changelog](./CHANGELOG.md)\n\n## *Asset / Link Object* fields\n\nThe following fields can be used for assets (in the\n[`Asset Object`](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md#asset-object)) or links (in the\n[`Link Object`](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md#link-object)).\n\n| Field Name               | Type                                  | Description                                                                                                                                                                                                                                                                                              |\n| ------------------------ | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| file:byte_order          | string                                | The byte order of integer values in the file. One of `big-endian` or `little-endian`.                                                                                                                                                                                                                    |\n| file:checksum            | string                                | Provides a way to specify file [checksums](#checksums) (e.g. BLAKE2, MD5, SHA1, SHA2, SHA3). The hashes are self-identifying hashes as described in the [Multihash specification](https://github.com/multiformats/multihash) and must be encoded as hexadecimal (base 16) string with lowercase letters. |\n| file:header_size         | integer                               | The header [size](#sizes) of the file, specified in bytes.                                                                                                                                                                                                                                               |\n| file:size                | integer                               | The file [size](#sizes), specified in bytes.                                                                                                                                                                                                                                                             |\n| file:values (deprecated) | \\[[Mapping Object](#mapping-object)\\] | Lists the value that are in the file and describes their meaning. See the [Mapping Object](#mapping-object) chapter for an example. If given, at least one array element is required. **Deprecated** in favor of the [classification extension](https://github.com/stac-extensions/classification/).     |\n| file:local_path          | string                                | A relative [local path](#local-path) for the asset/link.                                                                                                                                                                                                                                                 |\n\n**Note:** File specific details should not be part of the Item Assets Definition extension to Collections.\n\n### Mapping Object\n\n**NOTE:** `file:values` and their associated mapping objects are deprecated in\nfavor of the [classification extension](https://github.com/stac-extensions/classification/), and will be\nremoved in the next major release (v3.0.0).\n\nValue maps are used by assets/links that are used as classification layers and give details about the values in the asset/link and their meanings.\n\n| Field Name | Data Type | Description                                                                     |\n| ---------- | --------- | ------------------------------------------------------------------------------- |\n| values     | \\[any]    | **REQUIRED.** The value(s) in the file. At least one array element is required. |\n| summary    | string    | **REQUIRED.** A short description of the value(s).                              |\n\n For example for a cloud cover mask, `file:values` property could contain the following data:\n\n```json\n[\n\t{\"value\": [0], \"summary\": \"clear\"},\n\t{\"value\": [1], \"summary\": \"clouds\"},\n\t{\"value\": [2], \"summary\": \"cloud shadows\"}\n]\n```\n\n### Sizes\n\nPlease be aware that the integer values (always\nunsigned) given for the sizes (especially `file:size`)\nmay exceed the maximum value for the default integer\ndata type in your environment / programming language.\nIn this specification `integer` specifies\na integer number without an upper limit. You might\nneed to use other data types to store the values in.\nFor example, files with a size larger than around 2,14\nGB would exceed the maximum value for int32 and in\nJavaScript `BigInt` could be used then.\n\n### Checksums\n\n`file:checksum` was previously defined in the\n[`checksum` extension](https://github.com/radiantearth/stac-spec/tree/v1.0.0-beta.2/extensions/checksum/README.md)\nand the field name was `checksum:multihash` before\nSTAC v1.0.0-rc.1. The specification of the field has\nnot changed.\n\nBelow is a list with checksum examples for some algorithms supported by\n[Multihash](https://github.com/multiformats/multihash).\nThe checksums given are for an ASCII text file with the content `test`.\n\n- Algorithm `sha1` (160 bits): `1114a94a8fe5ccb19ba61c4c0873d391e987982fbbd3`\n- Algorithm `sha2` (256 bits): `12209f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08`\n- Algorithm `sha2` (256 bits truncated to 160 bits): `12149f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b`\n- Algorithm `blake2b-128`: `90e4021044a8995dd50b6657a037a7839304535b`\n\n### Local Path\n\nAn asset/link is referenced with a simple URL that does not give\na good indication about how the file might be organized together\nwith the other assets/links when downloaded and/or extracted to a\nlocal filesystem.\n\nBy default, the main purpose is file downloading but the purpose\nof this field may be refined by other extensions, e.g., an archive\nextension may indicate the location of the asset/link in a ZIP or TAR\nfile which at the same time is also the local path to extract the\nfile to.\nFor example, some software require that the asset/link is placed in\na specific relative folder or the metadata asset/link might contain\nreferences relative to another asset/link.\n\nThe `file:local_path` field indicates a **relative** path that\ncan be used by clients for different purposes to organize the\nfiles locally. For compatibility reasons the name-separator\ncharacter in paths **must** be `/` and the Windows separator `\\`\nis **not** allowed.\n\n**Example use case:**\n[SNAP toolbox](https://step.esa.int/main/) reads the SAFE manifest\nto open a product that references the different files (e.g. image bands)\nrelatively and thus expects to find them in the referenced folder (e.g. `IMG_DATA`).\n\n## Contributing\n\nAll contributions are subject to the\n[STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md).\nFor contributions, please follow the\n[STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions\nfor running tests are copied here for convenience.\n\n### Running tests\n\nThe same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid.\nTo run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/).\n\nFirst you'll need to install everything with npm once. Just navigate to the root of this repository and on\nyour command line run:\n```bash\nnpm install\n```\n\nThen to check markdown formatting and test the examples against the JSON schema, you can run:\n```bash\nnpm test\n```\n\nThis will spit out the same texts that you see online, and you can then go and fix your markdown or examples.\n\nIf the tests reveal formatting problems with the examples, you can fix them with:\n```bash\nnpm run format-examples\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstac-extensions%2Ffile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstac-extensions%2Ffile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstac-extensions%2Ffile/lists"}