@@ -5319,12 +5319,17 @@ def ci_put_object_from_local_file_and_get_qrcode(self, Bucket, LocalFilePath, Ke
53195319 with open (LocalFilePath , 'rb' ) as fp :
53205320 return self .ci_put_object (Bucket , fp , Key , EnableMD5 , ** kwargs )
53215321
5322- def ci_get_object_qrcode (self , Bucket , Key , Cover , ** kwargs ):
5322+ def ci_get_object_qrcode (self , Bucket , Key , Cover , BarType = 0 , ** kwargs ):
53235323 """单文件CI下载接口,返回文件二维码信息
53245324
53255325 :param Bucket(string): 存储桶名称.
53265326 :param Key(string): COS路径.
53275327 :param Cover(int): 二维码覆盖功能.
5328+ :param BarType(int): 二维码/条形码识别功能,将对识别出的二维码/条形码 覆盖马赛克. 取值为0,1,2:
5329+ 0表示都识别
5330+ 1表示识别二维码
5331+ 2表示识别条形码
5332+ 默认值0
53285333 :param kwargs(dict): 设置下载的headers.
53295334 :return(dict,dict): 操作返回的结果.
53305335
@@ -5355,10 +5360,11 @@ def ci_get_object_qrcode(self, Bucket, Key, Cover, **kwargs):
53555360 params = format_values (params )
53565361
53575362 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 (
53595364 url = to_unicode (url ),
53605365 ci = to_unicode ('ci-process=QRcode&cover' ),
5361- cover = Cover
5366+ cover = Cover ,
5367+ barType = BarType
53625368 )
53635369
53645370 logger .info ("get object, url=:{url} ,headers=:{headers}, params=:{params}" .format (
0 commit comments