{"id":23765566,"url":"https://github.com/china-li-shuo/oss-utils","last_synced_at":"2025-09-05T09:32:50.486Z","repository":{"id":62501724,"uuid":"401614104","full_name":"china-li-shuo/oss-utils","owner":"china-li-shuo","description":"Supper quick use Aliyun OSS or Tencent COS or Qiniu Koa to get、put、delete Object.","archived":false,"fork":false,"pushed_at":"2021-09-26T01:59:01.000Z","size":25,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-07T21:34:47.822Z","etag":null,"topics":["aliyun","oss","php","qiniu","storage","tencent"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/china-li-shuo.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":"2021-08-31T07:35:01.000Z","updated_at":"2023-03-21T02:02:11.000Z","dependencies_parsed_at":"2022-11-02T12:01:44.732Z","dependency_job_id":null,"html_url":"https://github.com/china-li-shuo/oss-utils","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/china-li-shuo%2Foss-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/china-li-shuo%2Foss-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/china-li-shuo%2Foss-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/china-li-shuo%2Foss-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/china-li-shuo","download_url":"https://codeload.github.com/china-li-shuo/oss-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232034917,"owners_count":18463360,"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":["aliyun","oss","php","qiniu","storage","tencent"],"created_at":"2024-12-31T23:15:04.066Z","updated_at":"2024-12-31T23:15:04.863Z","avatar_url":"https://github.com/china-li-shuo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 介绍（oss-utils）\r\n\r\n一个集成阿里云、腾讯云、七牛云对象存储的工具类\r\n\r\nAn SDK integrating Alibaba cloud, Tencent cloud and qiniu cloud object storage\r\n\r\n超级快速使用阿里云OSS或腾讯COS及七牛云Koa获取、放置、删除对象\r\n\r\nSupper quick use Aliyun OSS or Tencent COS or Qiniu Koa to get、put、delete Object.\r\n\r\n## 安装（Installation）\r\n\r\n```php\r\ncomposer require china-lishuo/oss-utils\r\n```\r\n\r\n## 案列（example）\r\n\r\n```php\r\nuse lishuo\\oss\\Manager;\r\nuse lishuo\\oss\\storage\\StorageConfig;\r\n\r\n    // 参数1：string $appId\r\n    // 参数2：string $appKey\r\n    // 参数3：string $region 地域名、比如（1）阿里云上海为例（http://oss-cn-shanghai.aliyuncs.com）（2）腾讯云上海为例（sh）直接地域名首字母即可（3）其它Region请按实际情况填写。\r\n    \r\n    $config = new StorageConfig(\"控制台查看获取\", \"控制台查看获取\", \"七牛云不需要配置这个参数，留空字符串\");\r\n\r\n    $storage = Manager::storage(\"云存储厂商\") // 阿里云：aliyun、腾讯云：tencent、七牛云：qiniu\r\n        -\u003einit($config) // 初始化配置\r\n        -\u003ebucket(\"存储桶名称\"); // 指定操作的存储桶\r\n\r\n    // 查看文件列表\r\n    $storage-\u003eget(10); // 指定查看10条\r\n    // 上传文件\r\n    $path = \"./test.jpg\";\r\n    $result = $storage-\u003eput(\"test.jpg\", $path);\r\n    // 删除文件\r\n    $keys = ['test.jpg'];\r\n    $result = $storage-\u003edelete($keys);\r\n```\r\n\r\n## 报错参考（Error reporting）\r\n\r\n腾讯云本地上传报错：cURL error 60: SSL certificate problem: self signed certificate in certificate chain\r\n\r\n解决方案：https://juejin.cn/post/7012052806337036301/\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchina-li-shuo%2Foss-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchina-li-shuo%2Foss-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchina-li-shuo%2Foss-utils/lists"}