对象存储BOS

    PutBucketCopyrightProtection

    接口描述

    本接口用来开启Bucket的原图保护功能,并指定resource字段,表示生效的资源范围。 对于开通原图保护的文件,不允许匿名下载访问该文件,或带自定义图片处理参数访问,只允许使用style样式访问或携带合法签名访问。

    请求语法

    PUT /?copyrightProtection HTTP/1.1
    Host: <BucketName>.bj.bcebos.com
    x-bce-date: date
    Content-Length: request-body length
    Content-Type: application/json; charset=utf-8
    Authorization: AuthorizationString
    
    (request body: json string)

    请求示例

    PUT /?copyrightProtection HTTP/1.1
    Host: <BucketName>.bj.bcebos.com
    x-bce-date: 2016-04-06T06:34:40Z 
    Content-Length: request-body length
    Content-Type: application/json; charset=utf-8
    Authorization: AuthorizationString
    
    {	
        "resource":[
                "bucket/prefix/*",
                "bucket/*/suffix"
        ]
    }

    响应示例

    HTTP/1.1 200 OK
    x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409
    Content-Length: 0
    Date: Wed, 06 Apr 2016 06:34:40 GMT
    Server: BceBos

    说明:用户必须拥有FULL_CONTROL权限。

    上一篇
    合规保留
    下一篇
    GetCopyrightProtection