{"bucket": "examplebucket-1250000000", // 最终投递合并产物文件的存储桶"region": "ap-guangzhou", // 最终投递合并产物文件的存储桶所在地域"key": "concat.txt", // 最终投递合并产物文件的名称/*** sourceList 用于指定需打包的源文件列表,格式为 JSON 数组* 每一项包含源文件 url 等信息,后续可能拓展更多参数** 如果源文件列表过长,可将 sourceList 参数 JSON 字符串化* 写入 .json 文件,上传到 COS,并通过 sourceConfigList 参数指定** sourceList 和 sourceConfigList 参数仅需指定一种即可*/"sourceList": [{"url": "https://examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com/file1.txt"},{"url": "https://examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com/file2.txt"},{"url": "https://examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com/file3.txt"}],"sourceConfigList": [{"url": "https://examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com/sourceList.json"}]}
参数名 | 参数描述 | 类型 | 是否必填 |
bucket | 最终投递合并产物文件的存储桶,命名格式为 BucketName-APPID,此处填写的存储桶名称必须为此格式,例如:examplebucket-1250000000 | String | 是 |
region | 最终投递合并产物文件的存储桶所在地域,枚举值请参见 地域和访问域名 | String | 是 |
key | 最终投递合并产物文件的名称(Object 的名称),对象在存储桶中的唯一标识,详情请参见 对象概述 | String | 是 |
sourceList | 源文件列表,sourceList 和 sourceConfigList 不能同时为空 | Array | 是 |
sourceList[].url | 源文件的 URL | String | 是 |
sourceConfigList | sourceList 的配置文件列表,如果您不希望在请求时携带整个 sourceList,可以将 sourceList 参数 JSON 字符串处理,生成 JSON 配置文件,上传到 COS,并在 sourceConfigList 中指定该文件的 URL,支持指定多个配置文件,sourceList 和 sourceConfigList 不能同时为空 | Array | 否 |
sourceConfigList[].url | sourceList 配置文件的 URL | String | 否 |
{"code": 0,"message": "cos concat file success","data": {"Location": "examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com/concat.txt","Bucket": "examplebucket-1250000000","Key": "concat.txt","ETag": "\\"152958e4f4bfded94c0b30f03343d6b8-1\\""}}
参数名 | 参数描述 | 类型 |
code | 业务错误码,如果为 0 则说明执行成功,否则为执行失败 | Number |
message | 执行结果的文字说明,可能为 null | String |
data | 执行成功的信息,如果执行成功,则包含合并产物文件的 URL 信息 | Object |
error | 执行的错误信息,如执行成功则为 null | Object or String |
{"bucket": "examplebucket-1250000000","region": "ap-guangzhou","key": "concat.txt","sourceList": [{"url": "https://examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com/file1.txt"},{"url": "https://examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com/file2.txt"},{"url": "https://examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com/file3.txt"}]}
concat.txt├── content of file1.txt├── content of file2.txt└── content of file3.txt
文档反馈