{"id":30580537,"url":"https://github.com/react-component/upload","last_synced_at":"2025-08-29T05:36:51.631Z","repository":{"id":32542033,"uuid":"36124056","full_name":"react-component/upload","owner":"react-component","description":"React Upload","archived":false,"fork":false,"pushed_at":"2025-08-12T06:08:29.000Z","size":10438,"stargazers_count":796,"open_issues_count":83,"forks_count":325,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-08-22T09:24:12.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://upload.react-component.vercel.app/","language":"TypeScript","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/react-component.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"ant-design","patreon":null,"open_collective":"ant-design","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2015-05-23T13:18:51.000Z","updated_at":"2025-08-11T06:24:53.000Z","dependencies_parsed_at":"2023-02-12T05:17:19.143Z","dependency_job_id":"5f6778dd-89fb-476a-9804-8dbf5559bb0a","html_url":"https://github.com/react-component/upload","commit_stats":{"total_commits":322,"total_committers":66,"mean_commits":4.878787878787879,"dds":0.7391304347826086,"last_synced_commit":"0d0ca2f65acca13f64199ffbb05054fb13c210ea"},"previous_names":[],"tags_count":136,"template":false,"template_full_name":null,"purl":"pkg:github/react-component/upload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fupload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fupload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fupload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fupload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/upload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fupload/sbom","scorecard":{"id":765422,"data":{"date":"2025-08-11","repo":{"name":"github.com/react-component/upload","commit":"49589547c9345090f2926cc0cc39e550b79de5de"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/react-component-ci.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/react-component-ci.yml:5: update your workflow using https://app.stepsecurity.io/secureworkflow/react-component/upload/react-component-ci.yml/master?enable=pin","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"Code-Review","score":4,"reason":"Found 12/25 approved changesets -- score normalized to 4","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":"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":"Maintained","score":10,"reason":"11 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 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-23T00:37:52.142Z","repository_id":32542033,"created_at":"2025-08-23T00:37:52.142Z","updated_at":"2025-08-23T00:37:52.142Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272636164,"owners_count":24967983,"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-08-29T02:00:10.610Z","response_time":87,"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":[],"created_at":"2025-08-29T05:36:47.045Z","updated_at":"2025-08-29T05:36:51.626Z","avatar_url":"https://github.com/react-component.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ant-design","https://opencollective.com/ant-design"],"categories":[],"sub_categories":[],"readme":"# rc-upload\n\nReact Upload\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-upload.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-upload\n[travis-image]: https://img.shields.io/travis/react-component/upload/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/upload\n[github-actions-image]: https://github.com/react-component/upload/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/upload/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/upload/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/upload\n[david-url]: https://david-dm.org/react-component/upload\n[david-image]: https://david-dm.org/react-component/upload/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/upload?type=dev\n[david-dev-image]: https://david-dm.org/react-component/upload/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-upload.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-upload\n[bundlephobia-url]: https://bundlephobia.com/package/rc-upload\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-upload\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## Example\n\nhttp://localhost:8000/\n\nonline example: https://upload.react-component.vercel.app/\n\n## Feature\n\n* support IE11+, Chrome, Firefox, Safari\n\n## install\n\n[![rc-upload](https://nodei.co/npm/rc-upload.png)](https://npmjs.org/package/rc-upload)\n\n## Usage\n\n```js\nvar Upload = require('rc-upload');\nvar React = require('react');\nReact.render(\u003cUpload /\u003e, container);\n```\n\n## API\n\n### props\n\n|name|type|default| description|\n|-----|---|--------|----|\n|name | string | file| file param post to server |\n|style | object | {}| root component inline style |\n|className | string | - | root component className |\n|disabled | boolean | false | whether disabled |\n|component | \"div\"|\"span\" | \"span\"| wrap component name |\n|action| string \u0026#124; function(file): string \u0026#124; Promise\u0026lt;string\u0026gt; | | form action url |\n|method | string | post | request method |\n|directory| boolean | false | support upload whole directory |\n|data| object/function(file) | | other data object to post or a function which returns a data object(a promise object which resolve a data object) |\n|headers| object | {} | http headers to post, available in modern browsers |\n|accept | string | | input accept attribute |\n|capture | string | | input capture attribute |\n|multiple | boolean | false | only support ie10+|\n|onStart | function| | start upload file |\n|onError| function| | error callback |\n|onSuccess | function | | success callback |\n|onProgress | function || progress callback, only for modern browsers|\n|beforeUpload| function |null| before upload check, return false or a rejected Promise will stop upload, only for modern browsers|\n|customRequest | function | null | provide an override for the default xhr behavior for additional customization|\n|withCredentials | boolean | false | ajax upload with cookie send |\n|openFileDialogOnClick | boolean | true | useful for drag only upload as it does not trigger on enter key or click event |\n|pastable | boolean | false | support paste upload |\n\n#### onError arguments\n\n1. `err`: request error message\n2. `response`: request response, not support on iframeUpload\n3. `file`: upload file\n\n### onSuccess arguments\n\n1. `result`: response body\n2. `file`: upload file\n3. `xhr`: xhr header, only for modern browsers which support AJAX upload. since\n   2.4.0\n\n\n### customRequest\n\nAllows for advanced customization by overriding default behavior in AjaxUploader. Provide your own XMLHttpRequest calls to interface with custom backend processes or interact with AWS S3 service through the aws-sdk-js package.\n\ncustomRequest callback is passed an object with:\n\n* `onProgress: (event: { percent: number }): void`\n* `onError: (event: Error, body?: Object): void`\n* `onSuccess: (body: Object): void`\n* `data: Object`\n* `filename: String`\n* `file: File`\n* `withCredentials: Boolean`\n* `action: String`\n* `headers: Object`\n\n\n### methods\n\nabort(file?: File) =\u003e void: abort the uploading file\n\n## License\n\nrc-upload is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fupload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Fupload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fupload/lists"}