Skip to content

Commit 1ebfa29

Browse files
livehighzhouxueyun
and
zhouxueyun
authored
Dev/demo (#177)
* feat: 新增cov命令 * fix: 补充d.ts * feat: 补充ci智能语音和云查毒接口 * fix: 修复Body类型 * fix: 更新依赖库版本 * upd: version * fix: 恢复版本 * upd: 新增单测 * upd: 新增单测 * upd: 新增单测 * upd: 新增单测 * upd: 补充单测 * upd: 补充单测 * upd: 补充单测 * feat: uploadSliceItem透传headers * upd: 补充单测 * upd: 补充单测 * upd: 更好xml2js * feat: 默认关闭FollowRedirect * upd: 补充图片处理、存储桶配置、文档处理、文件处理nodejs sdk (merge request !3) Squash merge branch 'dev/xueyunzhou' into 'master' upd: 补充图片处理、存储桶配置、文档处理、文件处理nodejs sdk * fix: 更新XMLParser配置 * fix: 更新XMLParser配置 * fix: 优化d.ts * feat: 优化万象demo * feat: 优化万象demo --------- Co-authored-by: zhouxueyun <[email protected]>
1 parent 42a01d0 commit 1ebfa29

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

demo/demo.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,7 @@ function DescribeDocProcessQueues() {
18011801
* 更新文档转码队列
18021802
*/
18031803
function UpdateDocProcessQueue() {
1804+
// 任务所在的队列 ID,请使用查询队列(https://cloud.tencent.com/document/product/460/46946)获取或前往万象控制台(https://cloud.tencent.com/document/product/460/46487)在存储桶中查询
18041805
let queueId = 'p31299c0b3f4742dda2fc1be3ea40xxxx' // 需要更新的队列ID
18051806
let host = config.Bucket + '.ci.' + config.Region + '.myqcloud.com';
18061807
let url = 'https://' + host + '/docqueue/' + queueId;
@@ -2616,8 +2617,7 @@ function SyncAuditImageObject() {
26162617
Query: {
26172618
'ci-process': 'sensitive-content-recognition',
26182619
// 'detect-url': '<url>',
2619-
// 'biz-type': '<type>', // 审核策略 id
2620-
// 'detect-type': 'porn,ads', // 审核类型 porn,ads
2620+
'biz-type': '', // 审核策略 id
26212621
// 'interval': 5, // gif截取间隔帧数
26222622
// 'max-frames': 5, // gif最大截帧数
26232623
}
@@ -2654,7 +2654,6 @@ function SyncAuditImageUrl() {
26542654
'ci-process': 'sensitive-content-recognition',
26552655
'detect-url': 'https://ftp.bmp.ovh/imgs/2021/09/ee4e63607465ed8d.jpg',
26562656
// 'biz-type': '<type>', // 审核策略 id
2657-
// 'detect-type': 'porn,ads', // 审核类型 porn,ads
26582657
// 'interval': 5, // gif截取间隔帧数
26592658
// 'max-frames': 5, // gif最大截帧数
26602659
}
@@ -2683,9 +2682,8 @@ function SyncAuditImageUrls() {
26832682
Object: 'audit/2.jpg',
26842683
}],
26852684
Conf: {
2686-
DetectType: 'Porn,Ads',
26872685
// Callback: '<url>', // 回调地址
2688-
// BizType: '', // 审核策略
2686+
BizType: '', // 审核策略
26892687
},
26902688
},
26912689
}),
@@ -2708,9 +2706,8 @@ function SyncAuditTextContent() {
27082706
Content: Buffer.from('高潮').toString('base64'),
27092707
},
27102708
Conf: {
2711-
DetectType: 'Porn,Terrorism,Politics,Ads,Illegal,Abuse',
27122709
// Callback: '<url>', // 回调地址
2713-
// BizType: '', // 审核策略
2710+
BizType: '', // 审核策略
27142711
},
27152712
},
27162713
}),
@@ -2735,9 +2732,8 @@ function CreateAuditJob() {
27352732
Object: objectKey,
27362733
},
27372734
Conf: {
2738-
DetectType: 'Porn,Ads',
27392735
// Callback: '<url>', // 回调地址
2740-
// BizType: '', // 审核策略
2736+
BizType: '', // 审核策略
27412737
},
27422738
},
27432739
}),
@@ -3033,6 +3029,7 @@ function getAsrQueue() {
30333029

30343030
// 更新语音识别队列
30353031
function putAsrQueue() {
3032+
// 任务所在的队列 ID,请使用查询队列(https://cloud.tencent.com/document/product/460/46946)获取或前往万象控制台(https://cloud.tencent.com/document/product/460/46487)在存储桶中查询
30363033
var queueId = 'pcc77499e85c311edb9865254008618d9';
30373034
var host = config.Bucket + '.ci.' + config.Region + '.myqcloud.com/asrqueue/' + queueId;
30383035
var url = 'https://' + host;
@@ -3344,6 +3341,7 @@ function createImageInspectJob() {
33443341

33453342
// 更新图片处理队列
33463343
function updatePicProcessQueue() {
3344+
// 任务所在的队列 ID,请使用查询队列(https://cloud.tencent.com/document/product/460/46946)获取或前往万象控制台(https://cloud.tencent.com/document/product/460/46487)在存储桶中查询
33473345
var queueId = 'p36e92002ff5b418497076f31d33d4xxx';
33483346
var host = config.Bucket + '.ci.' + config.Region + '.myqcloud.com/picqueue/' + queueId;
33493347
var url = 'https://' + host;
@@ -3455,7 +3453,6 @@ function createDocProcessJobs() {
34553453
Object: '1/文档转码_${Number}.jpg', // 转码后存到cos的路径
34563454
},
34573455
},
3458-
QueueId: 'p58639252a2cf45aba7a7f3335ffe3xxx', // 替换成自己的queueId
34593456
}
34603457
});
34613458
cos.request({
@@ -3494,7 +3491,6 @@ function describeDocProcessJobs() {
34943491
Key: 'doc_jobs',
34953492
Url: url,
34963493
Query: {
3497-
queueId: 'p58639252a2cf45aba7a7f3335ffe3xxx', // 替换成自己的queueId
34983494
tag: 'DocProcess',
34993495
},
35003496
},
@@ -3505,6 +3501,7 @@ function describeDocProcessJobs() {
35053501

35063502
// 更新文档预览队列
35073503
function updateDocProcessQueue() {
3504+
// 任务所在的队列 ID,请使用查询队列(https://cloud.tencent.com/document/product/460/46946)获取或前往万象控制台(https://cloud.tencent.com/document/product/460/46487)在存储桶中查询
35083505
var queueId = 'p58639252a2cf45aba7a7f3335ffe3xxx'; // 替换成自己的队列id
35093506
var host = config.Bucket + '.ci.' + config.Region + '.myqcloud.com/docqueue/' + queueId;
35103507
var url = 'https://' + host;
@@ -3618,6 +3615,7 @@ function createFileProcessBucket() {
36183615

36193616
// 更新文件处理队列
36203617
function updateFileProcessQueue() {
3618+
// 任务所在的队列 ID,请使用查询队列(https://cloud.tencent.com/document/product/460/46946)获取或前往万象控制台(https://cloud.tencent.com/document/product/460/46487)在存储桶中查询
36213619
var queueId = 'p5d0dc85debe149febdd6fd9b208aaxxx';
36223620
var host = config.Bucket + '.ci.' + config.Region + '.myqcloud.com/file_queue/' + queueId;
36233621
var url = 'https://' + host;

index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,10 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
19151915
Expires?: number,
19161916
/** 是否使用全球加速 */
19171917
UseAccelerate?: boolean,
1918+
/** 调用操作存储桶和对象的 API 时自定义请求域名。可以使用模板,如"{Bucket}.cos.{Region}.myqcloud.com",即在调用 API 时会使用参数中传入的 Bucket 和 Region 进行替换。 */
1919+
Domain?: string,
1920+
/** http协议,枚举值'http:','https:' */
1921+
Protocol?: string,
19181922
}
19191923
/** getObjectUrl 接口返回值 */
19201924
interface GetObjectUrlResult {

0 commit comments

Comments
 (0)