What do I do if the object ACL configurations for resumable upload operations do not take effect?
Updated at:
Problem description
The object access control list (ACL) configurations for resumable upload operations in Object Storage Service (OSS) SDK for Java do not take effect.
Causes
You cannot call resumable upload operations to configure object ACL.
Examples
You run the following sample code to configure object ACL for resumable upload operations, but the configurations do not take effect.
-
Example 1
ObjectMetadata objectMeta = new ObjectMetadata(); objectMeta.setObjectAcl(CannedAccessControlList.PublicRead); uploadFileRequest.setObjectMetadata(objectMeta); -
Example 2
objectMeta.setHeader("x-oss-object-acl", "public-read"); uploadFileRequest.setObjectMetadata(objectMeta);
Solutions
After you upload the object, call the setObjectAcl operation to configure the object ACL.
Is this page helpful?