{"id":20767004,"url":"https://github.com/binded/tus-header-parser","last_synced_at":"2025-12-12T12:02:42.901Z","repository":{"id":57382388,"uuid":"68419759","full_name":"binded/tus-header-parser","owner":"binded","description":"Express middleware that parses Tus headers and sets them inside a Map on req.tus","archived":false,"fork":false,"pushed_at":"2016-09-17T04:01:36.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-03T14:19:46.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binded.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-09-16T22:54:35.000Z","updated_at":"2017-01-28T04:50:46.000Z","dependencies_parsed_at":"2022-09-26T16:50:18.676Z","dependency_job_id":null,"html_url":"https://github.com/binded/tus-header-parser","commit_stats":null,"previous_names":["blockai/tus-header-parser"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Ftus-header-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Ftus-header-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Ftus-header-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Ftus-header-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binded","download_url":"https://codeload.github.com/binded/tus-header-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243094608,"owners_count":20235531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-17T11:27:12.693Z","updated_at":"2025-12-12T12:02:42.774Z","avatar_url":"https://github.com/binded.png","language":"JavaScript","readme":"# tus-header-parser\n\n[![Build Status](https://travis-ci.org/blockai/tus-header-parser.svg?branch=master)](https://travis-ci.org/blockai/tus-header-parser)\n\nExpress middleware that parses [Tus\nheaders](http://tus.io/protocols/resumable-upload.html#headers) and sets\nthem on `req.tus`.\n\n- Ignores syntactically invalid headers\n- Object keys are header names which have been converted to camelCase\n\n**Parsed headers:**\n\nTus-Resumable, Upload-Offset, Upload-Length, Upload-Metadata,\nUpload-Defer-Length, Upload-Checksum, Upload-Concat\n\n## Install\n\n```bash\nnpm install --save tus-header-parser\n```\n\nRequires Node v6+\n\n## Usage\n\nSee [./test](./test) directory for usage examples.\n\n```javascript\nimport tusParser from 'tus-header-parser'\n// ...\napp.use(tusParser())\napp.use((req, res, next) =\u003e {\n  console.log(req.headers)\n  // {\n  //   'tus-resumable': '1.0.0',\n  //   'upload-offset': '1000',\n  //   'upload-defer-length': '1',\n  //   'upload-length': '1337',\n  //   'upload-metadata': 'filename d29ybGRfZG9taW5hdGlvbl9wbGFuLnBkZg==,foo YmFy',\n  //   'upload-checksum': 'sha Kq5sNclPz7QV2+lfQIuc6R7oRu0=',\n  //   'upload-concat': 'final;/files/a /files/b',\n  // }\n  console.log(req.tus)\n  // {\n  //   tusResumable: '1.0.0',\n  //   uploadOffset: 1000,\n  //   uploadDeferLength: 1,\n  //   uploadLength: 1337,\n  //   uploadMetadata: {\n  //     filename: 'world_domination_plan.pdf',\n  //     foo: 'bar',\n  //   },\n  //   uploadChecksum: {\n  //     algorithm: 'sha',\n  //     checksum: \u003cBuffer 2a ae 6c 35 c9 4f cf b4 15 db e9 5f 40 8b 9c e9 1e e8 46 ed\u003e,\n  //   },\n  //   uploadConcat: {\n  //     final: true,\n  //     urls: ['/files/a', '/files/b'],\n  //   },\n  // }\n})\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinded%2Ftus-header-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinded%2Ftus-header-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinded%2Ftus-header-parser/lists"}