{"id":16954120,"url":"https://github.com/vinzscam/react-native-tus-client","last_synced_at":"2025-11-12T22:36:05.773Z","repository":{"id":52951224,"uuid":"126543780","full_name":"vinzscam/react-native-tus-client","owner":"vinzscam","description":"React Native client for the tus resumable upload protocol.","archived":false,"fork":false,"pushed_at":"2023-08-23T16:09:26.000Z","size":62,"stargazers_count":43,"open_issues_count":7,"forks_count":33,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-17T21:42:00.307Z","etag":null,"topics":["android","file-upload","ios","javascript","react-library","react-native","tus","upload","upload-file","uploader"],"latest_commit_sha":null,"homepage":"","language":"Java","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/vinzscam.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-23T22:13:41.000Z","updated_at":"2025-10-10T08:15:37.000Z","dependencies_parsed_at":"2024-10-27T12:40:48.634Z","dependency_job_id":"4f09c5ab-36fd-46c1-a54f-bffb3ffdb608","html_url":"https://github.com/vinzscam/react-native-tus-client","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.06666666666666665,"last_synced_commit":"538d8c0551dfb136c56be3da28cf7728a814616a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/vinzscam/react-native-tus-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinzscam%2Freact-native-tus-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinzscam%2Freact-native-tus-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinzscam%2Freact-native-tus-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinzscam%2Freact-native-tus-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinzscam","download_url":"https://codeload.github.com/vinzscam/react-native-tus-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinzscam%2Freact-native-tus-client/sbom","scorecard":{"id":922894,"data":{"date":"2025-08-11","repo":{"name":"github.com/vinzscam/react-native-tus-client","commit":"538d8c0551dfb136c56be3da28cf7728a814616a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-25T06:17:22.044Z","repository_id":52951224,"created_at":"2025-08-25T06:17:22.044Z","updated_at":"2025-08-25T06:17:22.044Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284122919,"owners_count":26951149,"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","status":"online","status_checked_at":"2025-11-12T02:00:06.336Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","file-upload","ios","javascript","react-library","react-native","tus","upload","upload-file","uploader"],"created_at":"2024-10-13T22:08:53.663Z","updated_at":"2025-11-12T22:36:05.751Z","avatar_url":"https://github.com/vinzscam.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# react-native-tus-client\nReact Native client for the **tus** resumable upload protocol [tus.io](https://tus.io) inspired to [tus-js-client](https://github.com/tus/tus-js-client).\n\n\nIt provides a native tus compliant implementation through the official [TUSKit](https://github.com/tus/TUSKit) and [tus-android-client](https://github.com/tus/tus-android-client) libraries.\n\n## Getting started\n\n`$ npm install react-native-tus-client --save`\n\nor\n\n`$ yarn add react-native-tus-client`\n\n### Mostly automatic installation\n\n```\n# RN \u003e= 0.60\ncd ios \u0026\u0026 pod install\n\n# RN \u003c 0.60\nreact-native link react-native-tus-client\n```\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ `react-native-tus-client` and add `RNTusClient.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRNTusClient.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Run your project (`Cmd+R`)\n\n#### Android\n\n1. Open up `android/app/src/main/java/[...]/MainActivity.java`\n  - Add `import com.vinzscam.RNTusClientPackage;` to the imports at the top of the file\n  - Add `new RNTusClientPackage()` to the list returned by the `getPackages()` method\n2. Append the following lines to `android/settings.gradle`:\n  \t```\n  \tinclude ':react-native-tus-client'\n  \tproject(':react-native-tus-client').projectDir = new File(rootProject.projectDir, \t'../node_modules/react-native-tus-client/android')\n  \t```\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n  \t```\n      compile project(':react-native-tus-client')\n  \t```\n\n## Usage\nAll you need to know to upload a file to a [tus](https://tus.io/) server is the **local absolute path where the file is stored**.\nIf you know it, you can just invoke the library as described in the snippet at the end of this section.\nIf you don't know where your file is stored, some other library like [react-native-image-picker](https://github.com/react-community/react-native-image-picker) might help you.\n\n\n### Upload a file by its absolute path\n\n```javascript\nimport { Upload } from 'react-native-tus-client';\n\nconst absoluteFilePath = // absolute path to your file;\nconst upload = new Upload(absoluteFilePath, {\n  endpoint: 'https://master.tus.io/files/', // use your tus server endpoint instead\n  onError: error =\u003e console.log('error', error),\n  onSuccess: () =\u003e {\n    console.log('Upload completed! File url:', upload.url);\n  },\n  onProgress: (uploaded, total) =\u003e console.log(\n    `Progress: ${(uploaded/total*100)|0}%`)\n});\nupload.start();\n\n```\n\n### Upload an image using [react-native-image-picker](https://github.com/react-community/react-native-image-picker)\n\n```javascript\nimport ImagePicker from 'react-native-image-picker';\nimport { Upload } from 'react-native-tus-client';\n\nnew Promise((resolve, reject) =\u003e {\n  ImagePicker.showImagePicker({ }, ({ uri, error, path }) =\u003e {\n    return uri ? resolve(path || uri) : reject(error || null);\n  });\n})\n.then(file =\u003e {\n  const upload = new Upload(file, {\n    endpoint: 'https://master.tus.io/files/', // use your tus server endpoint instead\n    onError: error =\u003e console.log('error', error),\n    onSuccess: () =\u003e {\n      console.log('Upload completed. File url:', upload.url);\n    },\n    onProgress: (uploaded, total) =\u003e console.log(\n      `Progress: ${(uploaded/total*100)|0}%`)\n  });\n  upload.start();\n})\n.catch(e =\u003e console.log('error', e));\n\n```\n\n\n## API\n\n### Class Upload\n\nClass representing a tus upload.\n\n#### Constructor\n\n`new Upload(file, settings)`\n\n##### Parameters:\n\nName    | Type   | Description\n----    | ------ | :-----------\nfile    | string | The file absolute path\noptions | object | The options argument used to setup your tus upload. See below.\n\n#### Options:\n\nProperty | Type | Mandatory | Description\n-------- | ---- | --------- | :----------\nendpoint | string | **Yes** | URL used to create the upload\nheaders | object | No | An object with custom header values used in all requests.\nmetadata | object | No | An object with string values used as additional meta data which will be passed along to the server when (and only when) creating a new upload. Can be used for filenames, file types etc.\nonError | function | No | a function called once an error appears. The arguments will be an `Error` instance.\nonProgress | function | No | a function that will be called each time progress information is available. The arguments will be `bytesSent` and `bytesTotal`\nonSuccess | function | No | a function called when the upload finished successfully.\n\n#### Methods\n\nName | Description\n---- | :-----------\nstart | Start or resume the upload using the specified file. If no file property is available the error handler will be called.\nabort | Abort the currently running upload request and don't continue. You can resume the upload by calling the start method again.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinzscam%2Freact-native-tus-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinzscam%2Freact-native-tus-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinzscam%2Freact-native-tus-client/lists"}