API | Operation | Description |
Querying file information | Queries media file information |
CosResult GetMediaInfo(const GetMediaInfoReq& request, GetMediaInfoResp* response);
qcloud_cos::CosConfig config("./config.json");qcloud_cos::CosAPI cos(config);GetMediaInfoReq req(bucket_name, object_name);GetMediaInfoResp resp;CosResult result = cos.GetMediaInfo(req, &resp);if (result.IsSucc()) {// The call is successful. You can call the `resp` member functions to get the return content.std::cout << "Result: " << resp.GetResult().to_string() << std::endl;} else {// The call failed. You can call the `result` member functions to get the error information.}
Parameter | Description | Type | Required |
request | Operation request. | GetMediaInfoReq | Yes |
response | Operation response. | GetMediaInfoResp | Yes |
Was this page helpful?