Original image protection
Updated at:2025-11-03
put_bucket_copyright_protection
This API allows you to enable the original image protection function for a bucket and specify the resource field to define the valid resource scope. For files with original image protection enabled, anonymous downloads, access without proper authorization, or access with custom image processing parameters are not allowed. Only access based on styles or valid signatures is permitted.
Python
1resource = [bucket_name + "/test/*"]
2bos_client.put_bucket_copyright_protection(bucket_name, resource)
get_bucket_copyright_protection
This command retrieves the original image protection configuration of a bucket.
Python
1response = bos_client.get_bucket_copyright_protection(bucket_name)
delete_bucket_copyright_protection
This API is designed to disable the original image protection function of the bucket.
Python
1bos_client.delete_bucket_copyright_protection(bucket_name)
