@@ -5319,12 +5319,17 @@ def ci_put_object_from_local_file_and_get_qrcode(self, Bucket, LocalFilePath, Ke
5319
5319
with open (LocalFilePath , 'rb' ) as fp :
5320
5320
return self .ci_put_object (Bucket , fp , Key , EnableMD5 , ** kwargs )
5321
5321
5322
- def ci_get_object_qrcode (self , Bucket , Key , Cover , ** kwargs ):
5322
+ def ci_get_object_qrcode (self , Bucket , Key , Cover , BarType = 0 , ** kwargs ):
5323
5323
"""单文件CI下载接口,返回文件二维码信息
5324
5324
5325
5325
:param Bucket(string): 存储桶名称.
5326
5326
:param Key(string): COS路径.
5327
5327
:param Cover(int): 二维码覆盖功能.
5328
+ :param BarType(int): 二维码/条形码识别功能,将对识别出的二维码/条形码 覆盖马赛克. 取值为0,1,2:
5329
+ 0表示都识别
5330
+ 1表示识别二维码
5331
+ 2表示识别条形码
5332
+ 默认值0
5328
5333
:param kwargs(dict): 设置下载的headers.
5329
5334
:return(dict,dict): 操作返回的结果.
5330
5335
@@ -5355,10 +5360,11 @@ def ci_get_object_qrcode(self, Bucket, Key, Cover, **kwargs):
5355
5360
params = format_values (params )
5356
5361
5357
5362
url = self ._conf .uri (bucket = Bucket , path = Key )
5358
- url = u"{url}?{ci}={cover}" .format (
5363
+ url = u"{url}?{ci}={cover}&bar-type={barType} " .format (
5359
5364
url = to_unicode (url ),
5360
5365
ci = to_unicode ('ci-process=QRcode&cover' ),
5361
- cover = Cover
5366
+ cover = Cover ,
5367
+ barType = BarType
5362
5368
)
5363
5369
5364
5370
logger .info ("get object, url=:{url} ,headers=:{headers}, params=:{params}" .format (
0 commit comments