{"id":19345561,"url":"https://github.com/future-team/eg-upload","last_synced_at":"2026-05-16T06:39:40.912Z","repository":{"id":57220262,"uuid":"58355310","full_name":"future-team/eg-upload","owner":"future-team","description":"eagle-ui上传组件","archived":false,"fork":false,"pushed_at":"2019-07-24T03:30:18.000Z","size":451,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-10-19T22:40:46.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/future-team.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-05-09T06:57:25.000Z","updated_at":"2019-07-24T03:30:19.000Z","dependencies_parsed_at":"2022-08-29T00:11:58.217Z","dependency_job_id":null,"html_url":"https://github.com/future-team/eg-upload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/future-team/eg-upload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-team","download_url":"https://codeload.github.com/future-team/eg-upload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-upload/sbom","scorecard":{"id":414699,"data":{"date":"2025-08-11","repo":{"name":"github.com/future-team/eg-upload","commit":"a82985864d487652172a036f9e0c8774ea170f18"},"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 2/23 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":"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 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-18T23:32:16.429Z","repository_id":57220262,"created_at":"2025-08-18T23:32:16.429Z","updated_at":"2025-08-18T23:32:16.429Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33092893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-10T04:07:01.862Z","updated_at":"2026-05-16T06:39:40.895Z","avatar_url":"https://github.com/future-team.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eg-upload\n\n这是一款基于eagle-ui开发的上传文件组件；\n\n## UI展示\n\n![ui展示](example/img/test.gif)\n\n## 使用\n\n```js\n\n\timport {Upload} from 'eg-upload';\n    import React, { Component ,PropTypes} from 'react';\n    import ReactDom from 'react/lib/ReactDOM';\n    \n    //completeCallback 全部上传完成\n    //successCallback  单张上传成功 会执行多次\n    //failureCallback  上传失败\n    ReactDom.render(\n        \u003cUpload uploadUrl=\"http://172.24.121.17:8080/attachment/upload\" maxNumber={5} successCallback={(file,data)=\u003e{}} \n          \tcompleteCallback={()=\u003e{}}\n\t\t\tfailureCallback={(file,data)=\u003e{}}\n\t\t\tfilter={()=\u003e{}}\n\t\t\tuploadBtnText=\"选择上传文件\"\n          /\u003e,\n        document.getElementById('root')\n    );\n\n```\n\n## API\n\n### props\n    \n- `uploadUrl`：提交服务器地址；      \n- `maxSize`：允许上传文件大小；           \n- `maxNumber`：文件最大上传数量；   \n- `minNumber`：文件最少上传数量；   \n- `uploadBtnText`：上传按钮文案； \n- `maxNumberMessage`：超出范围的提示文案； \n- `egSize`：上传按钮大小（default、xs、sm、lg）;      \n- `egStyle`：上传按钮颜色（error、warning、danger、link、gray、white、success、''）；      \n- `width`：略缩图容器的宽度；       \n- `height`：略缩图容器的高度；      \n- `thumbWidth`：略缩图宽度；     \n- `thumbHeight`：略缩图高度；        \n    \n### callback\n    \n- `completeCallback(successImageList,imageListSize)`：上传单个文件成功后和删除文件后执行的方法，`successImageList`上传成功后的文件列表，`imageListSize`一共选择多少个文件； \n     \n- `failureCallback(file,responseText)`：上传单个文件失败后执行，`file`失败后的文件，`responseText`失败信息，由服务端返回；        \n\n- `successCallback(file,data)`：单个文件上传成功后执行，`file`上传成功的文件，`data`服务端返回的json数据；      \n\n- `renderItemCallback(files)`：返回自定义略缩图模板，用户可自定义容器中显示的内容模板，该方法的作用域为upload对象本身，`files`需要显示的文件列表，\n        \n    ```js\n    \n        renderItemCallback([\n            index:file.index,//文件的索引\n            name:file.name,//文件的名字\n            result:'',//base64\n            type:file.type//类型\n        ])\n    ```\n- `filter(files,maxSize)`：过滤不允许上传的文件      \n\n    ```js\n    \n        filter=(files,maxSize)=\u003e{\n            var arrFiles = [];\n            for (var i = 0, file; file = files[i]; i++) {\n                arrFiles.push(file);\n                if (file.type.indexOf(\"image\") == 0) {\n                    if (file.size \u003e= maxSize) {\n                        alert(`您这张${file.name}图片大小过大，应小于${maxSize}k`);\n                    } else {\n                        arrFiles.push(file);\n                    }\n                } else {\n                    alert('文件\"' + file.name + '\"不是图片。');\n                }\n            }\n            return arrFiles;\n        }\n    ```\n    \n## 项目示例\n\n下载项目到本地安装依赖包后执行 **npm run demo** 即可查看示例演示。\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-team%2Feg-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-team%2Feg-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-team%2Feg-upload/lists"}