{"id":16498672,"url":"https://github.com/riccox/oss-uploader-js","last_synced_at":"2025-03-01T16:25:09.691Z","repository":{"id":58352837,"uuid":"531048470","full_name":"riccox/oss-uploader-js","owner":"riccox","description":"This a node package helps you to integrate multi-type object storage services into one line code.","archived":false,"fork":false,"pushed_at":"2022-10-18T14:43:47.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T07:43:08.476Z","etag":null,"topics":["aws-s3","cos","nodejs","oss","s3","tencent-cos","tencentcloud","uploader"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@lrvinye/oss-uploader","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/riccox.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":"2022-08-31T11:12:23.000Z","updated_at":"2022-09-01T04:53:25.000Z","dependencies_parsed_at":"2023-01-20T08:15:41.152Z","dependency_job_id":null,"html_url":"https://github.com/riccox/oss-uploader-js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccox%2Foss-uploader-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccox%2Foss-uploader-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccox%2Foss-uploader-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riccox%2Foss-uploader-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riccox","download_url":"https://codeload.github.com/riccox/oss-uploader-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241391358,"owners_count":19955516,"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":["aws-s3","cos","nodejs","oss","s3","tencent-cos","tencentcloud","uploader"],"created_at":"2024-10-11T14:49:42.368Z","updated_at":"2025-03-01T16:25:09.668Z","avatar_url":"https://github.com/riccox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @lrvinye/oss-uploader\n\n![Build Status](https://github.com/lrvinye/oss-uploader/actions/workflows/main.yml/badge.svg)\n![publish-size](https://badgen.net/packagephobia/publish/@lrvinye/oss-uploader)\n![publish-size](https://badgen.net/bundlephobia/minzip/@lrvinye/oss-uploader)\n![release](https://badgen.net/github/release/lrvinye/oss-uploader)\n![stars](https://badgen.net/github/stars/lrvinye/oss-uploader)\n![package version](https://badgen.net/npm/v/@lrvinye/oss-uploader)\n![downloads](https://badgen.net/npm/dt/@lrvinye/oss-uploader)\n![node](https://badgen.net/npm/node/@lrvinye/oss-uploader)\n![dependents](https://badgen.net/npm/dependents/@lrvinye/oss-uploader)\n![license](https://badgen.net/npm/license/@lrvinye/oss-uploader)\n![types](https://badgen.net/npm/types/@lrvinye/oss-uploader)\n\nThis a node package helps you to integrate multi-type object storage services into one line code.\n\n### Usage\n\n```\nnpm i @lrvinye/oss-uploader \n```\n\n```ts\nimport { OSSProvider, Uploader, UploadResult } from '@lrvinye/oss-uploader';\nconst uploader = new Uploader({\n  provider: OSSProvider.S3, // can be S3|COS\n  endpoint: 's3.${region}.amazonaws.com',\n  bucket: 'bucketName',\n  credential: {\n    secretId: '-',\n    secretKey: '-',\n  },\n  prefix: '/images',\n});\nuploader\n  .upload({body: fs.readFileSync(\"foo.jpg\"), mime: \"image/jpeg\"})\n  .then((res: UploadResult) =\u003e {\n    console.log(res); // { uri: \"images/VkbqGp6iKG3UbGgU.jpeg\" }\n  });\n```\n\n### Test\n\n```\npnpm install \n```\n\n```\npnpm test \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friccox%2Foss-uploader-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friccox%2Foss-uploader-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friccox%2Foss-uploader-js/lists"}