原图保护
更新时间:2022-07-13
put_bucket_copyright_protection
本接口用来开启Bucket的原图保护功能,并指定resource字段,表示生效的资源范围。 对于开通原图保护的文件,不允许匿名下载访问该文件,或带自定义图片处理参数访问,只允许使用style样式访问或携带合法签名访问。
resource = [bucket_name + "/test/*"]
bos.put_bucket_copyright_protection(bucket_name, resource)
get_bucket_copyright_protection
此命令用来获取某个Bucket的原图保护配置情况。
response = bos.get_bucket_copyright_protection(bucket_name)
delete_bucket_copyright_protection
本接口用来关闭Bucket原图保护功能。
bos.delete_bucket_copyright_protection(bucket_name)