This topic describes the common problems that you may encounter when using the OSS Media-C SDK and the corresponding solutions.

What is the relationship between the OSS Media-C SDK and the OSS C SDK?

The OSS Media-C SDK is dependent on the OSS C SDK. The upload and download features of the OSS Media-C SDK are implemented by calling the API operations of the OSS C SDK.

Is the OSS Media-C SDK supported on Windows?

No, the OSS Media-C SDK is not supported on Windows.

Can I append an object?

Yes. When calling the oss_media_file_open operation, you can enable the "a" mode. Then you can append the object by calling the oss_media_file_write operation.

What is a role ARN? How do I obtain a role ARN?

  • A role ARN is the ID of a role.
  • In the Resource Access Management console, click RAM Roles. Click the name of a role. In the Basic Information section, view the ARN field. The value of ARN is in acs:ram::xxxx:role/yyyyy format. If no role has been created, create a new role and other corresponding roles on the RAM Roles page. Grant the AliyunSTSAssumeRoleAccess permissions to the new role. For more information, see What is RAM?

How do I run the sample?

Modify the sample/config.c file, and configure the AccessKey ID, AccessKey secret, and bucket parameters. When compilation is complete, you can find the sample executable file in the bin directory.

When I run the sample, the message "error:Couldn't resolve host name [code=-990, message=HttpIoError]" is reported. What can I do?

Modify the sample/config.c file, configure the related parameters, and recompile the sample.

What is the difference between the client side and the server side in configuring the AccessKey ID, AccessKey secret, and token parameters? What must I take note of?

  • You only need to specify the AccessKey ID and AccessKey secret parameters for server-side configuration. The values of these parameters can be the AccessKey pairs of an Alibaba Cloud account or a RAM user.
  • There are two options for client-side configuration. You can either configure the AccessKey ID and AccessKey secret parameters, or the AccessKey ID, AccessKey secret, and token parameters. The values of these parameters can be obtained from the server by calling oss_media_get_token or oss_media_get_token_from_policy. Temporary AccessKey pairs and tokens have validity periods, after which the credentials expire and become invalid.

When I try to obtain a token while running the sample, the message "http_code=500, error_code=GetSTSTokenError, error_message=Internal Error" is reported. What can I do?

  • Cause: The system failed to access STS because the libcurl library installed does not support HTTPS. Specifically, SSL development packages such as openssl-devel are not installed, and are not included during compilation. As a result, the libcurl library does not support HTTPS, causing STS access failures.
  • Solution: Install an SSL development package such as openssl-devel and reinstall libcurl. When you install libcurl, run the ./configure command and check whether HTTPS is displayed in Protocols in the last line of the command output. execution. HTTPS is supported if displayed.