{"id":22407528,"url":"https://github.com/imlinhanchao/github-picbed","last_synced_at":"2026-02-28T20:02:33.928Z","repository":{"id":75665746,"uuid":"219317777","full_name":"imlinhanchao/github-picbed","owner":"imlinhanchao","description":"A picture bed based on GitHub.","archived":false,"fork":false,"pushed_at":"2023-05-15T02:59:28.000Z","size":20,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-20T02:20:05.629Z","etag":null,"topics":["github","pages","picture","upload"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/github-picbed","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imlinhanchao.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-11-03T14:59:00.000Z","updated_at":"2025-08-13T08:50:54.000Z","dependencies_parsed_at":"2023-06-03T19:30:20.440Z","dependency_job_id":null,"html_url":"https://github.com/imlinhanchao/github-picbed","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.08695652173913049,"last_synced_commit":"173be7b4db83b715bcefcce62e7224bed430a69c"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/imlinhanchao/github-picbed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imlinhanchao%2Fgithub-picbed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imlinhanchao%2Fgithub-picbed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imlinhanchao%2Fgithub-picbed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imlinhanchao%2Fgithub-picbed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imlinhanchao","download_url":"https://codeload.github.com/imlinhanchao/github-picbed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imlinhanchao%2Fgithub-picbed/sbom","scorecard":{"id":485725,"data":{"date":"2025-08-11","repo":{"name":"github.com/imlinhanchao/github-picbed","commit":"0b7d328680cb711724dfbbee2054f143c6855c60"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"Code-Review","score":0,"reason":"Found 1/25 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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":"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 1 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-19T17:43:30.750Z","repository_id":75665746,"created_at":"2025-08-19T17:43:30.750Z","updated_at":"2025-08-19T17:43:30.750Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29951071,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["github","pages","picture","upload"],"created_at":"2024-12-05T11:14:39.301Z","updated_at":"2026-02-28T20:02:33.921Z","avatar_url":"https://github.com/imlinhanchao.png","language":"JavaScript","readme":"# GitHub Picture Bed\n\nA picture bed based on GitHub. Provide an HTTP file service through Pages. Upload images using the GitHub API.\n\n## Installation\n\n```bash\nnpm install github-picbed\n```\n\n## Usage \n\n```javascript\nconst github = require('github-picbed')({\n    token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',\n    repository: 'https://github.com/imlinhanchao/upload-file'\n})\nconst path = require('path');\n\nrouter.post('/upload', async (req, res, next) =\u003e {\n    let data = req.files[0].buffer;\n    let extname = path.extname(req.files[0].originalname);\n    let upload = await github.upload({ data, extname })\n    res.json(upload);\n})\n```\n\n## Preparation\n\n1. You need to create an access token in [GitHub](https://github.com/settings/tokens). Select only `repo` for the `select scopes`.\n2. Create a repository use to upload files. And then enable GitHub Pages.\n\n## Functions\n\n### Config Upload Options\n\n```javascript\nasync function config({ token, repository });\n```\n\n#### Parameter Object \n|key|description|\n|--|--|\n|token|Your GitHub access token.|\n|repository|Your repository use to upload files.|\n\n### Check Initialize State\n\n```javascript\nasync function isInitialized();\n```\n\n#### Return Value\n**bool** - true means finish initialize.\n\n### Upload file\n\n```javascript\nasync function upload({ data, extname, filename });\n```\n\n#### Parameter Object \n|key|description|\n|--|--|\n|data|The file path that you want to upload or the buffer of file.|\n|extname|The extname of file. You must set this key if the data is buffer.|\n|filename|The filename that you want to upload.(Options)|\n\n#### Return Object \n|key|description|\n|--|--|\n|filename|The filename that was eventually uploaded.|\n|url|Access URL.|\n\n## Notice\n\nAfter configuring the GitHub repository address and access token, it takes about 1 second to get the information of GitHub Pages. Therefore, please do not upload immediately after configuration. You can use `isInitialized` to check if initialization has been completed. Or use `await` to wait for the configuration to complete.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimlinhanchao%2Fgithub-picbed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimlinhanchao%2Fgithub-picbed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimlinhanchao%2Fgithub-picbed/lists"}