{"id":19585858,"url":"https://github.com/tencentyun/cos-plupload","last_synced_at":"2025-04-23T02:08:18.390Z","repository":{"id":83243053,"uuid":"85777245","full_name":"tencentyun/cos-plupload","owner":"tencentyun","description":"plupload demo for cos","archived":false,"fork":false,"pushed_at":"2024-12-04T07:13:29.000Z","size":367,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-23T02:08:12.972Z","etag":null,"topics":["cos","demo","qcloud"],"latest_commit_sha":null,"homepage":null,"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/tencentyun.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":"2017-03-22T02:43:12.000Z","updated_at":"2024-12-04T07:13:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"eef0f379-2032-46fe-bdde-3497c4c21025","html_url":"https://github.com/tencentyun/cos-plupload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencentyun%2Fcos-plupload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencentyun%2Fcos-plupload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencentyun%2Fcos-plupload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tencentyun%2Fcos-plupload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tencentyun","download_url":"https://codeload.github.com/tencentyun/cos-plupload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354509,"owners_count":21416752,"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":["cos","demo","qcloud"],"created_at":"2024-11-11T07:57:23.153Z","updated_at":"2025-04-23T02:08:18.372Z","avatar_url":"https://github.com/tencentyun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cos-plupload\n\nplupload-2.3.1 demo for 腾讯云 XML API\n\n## 使用步骤\n\n1. 在腾讯云 COS 控制台创建 bucket\n2. 确定使用的 COS 是 v4 版本：登陆https://console.qcloud.com/cos 如果左上角提示是云对象存储v4则说明要用v4的sdk否则就是v3的\n3. 在控制台给 bucket 是指好跨域规则:\n    * 来源 Origin: * 或指定域名\n    * 操作 Methods: 至少选中 GET、POST、PUT\n    * Allow-Headers: authorization,accept,content-type\n    * Expose-Headers: ETag\n4. 替换 cos/cos.js、server/auth.js、server/auth.php 里的配置信息，包括 appid、bucket、region、sid、skey\n5. 注意 cos/cos.js 文件里的计算签名代码仅仅用做前端调试阶段，正式部署请使用后端计算签名的方式，并删除掉文件里的 sid、skey 以免造成密钥泄漏。\n6. 把当前代码部署到静态服务器下，访问 examples 里的 html 可以试用 demo。\n7. 当前 demo 使用的是 COS XML API，注意 region 格式不要填写错误（华南:cn-south 华北:cn-north 华东:cn-east）\n8. 当前 demo 上传过程使用 PostObject 接口，目前（3月21日）仅支持华北园区支持此 API，其他园区会陆续支持，其他 XML API 请参考文档 https://www.qcloud.com/document/product/436/7751。\n\n## 部分 demo 说明\n\n1. 简单上传 demo: examples/custom.html\n2. 分片单并发上传 demo: examples/chunk.html\n3. 分片多并发上传 demo: examples/chunk-multi.html\n\n## 其他说明\n\n1. 如果需要支持 flash 上传，请防止一个 crossdomain.xml 文件，填写好允许跨域的配置，并设置文件公有读\n2. html4 上传方式下，文件上传成功时，plupload 会跨域报错，获取不到某个临时 iframe 里的内容，可以使用 plupload 的 debug 版本调试查看原因。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentyun%2Fcos-plupload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftencentyun%2Fcos-plupload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentyun%2Fcos-plupload/lists"}