The error is as follows:
The reason is that CORS is not correctly set for the bucket. For more information, see Setting CORS.
Check whether the
allowPrefix you entered when applying for the temporary key are correct.
cos.putObject(), but the
actiondoes not contain name/cos:PutObject, then there is no
putObjectpermission, resulting in the error 403.
1.jpg, but the
allowPrefixis entered as
test/*(only allowing operations on the
test/*path), then there is no operation permission for the corresponding path, resulting in the error 403.
allowPrefix are correct, see Generating and Using Temporary Keys and 403 Error for COS Access.
Field description: STS SDKs for different languages use different fields for
allowPrefix, such as
allowPrefixes in the STS Java SDK. Be sure to check the examples in the STS SDK.
You can troubleshoot the problem by referring to 403 Error for COS Access. If you use a temporary key for multipart upload, check whether you have the multipart upload permission as described in Working with COS API Authorization Policies and whether the authorized path is correct.
You can use the multipart upload API and increase the size of each part. For example, if the current part size is 1 MB, you can try to adjust it to 5 MB and then observe the bandwidth usage. For more information, see Uploading Object.
List Multipart Uploads API needs to use a callback function to return the progress. Therefore, you cannot obtain the progress directly.