use of com.tencentcloudapi.vod.v20180717.models.ModifyMediaInfoRequest in project cloud-sdk by mizhousoft.
the class QCloudVODServiceImpl method modifyCover.
/**
* {@inheritDoc}
*/
@Override
public String modifyCover(String fileId, String base64Data) throws CloudSDKException {
try {
ModifyMediaInfoRequest req = new ModifyMediaInfoRequest();
req.setCoverData(base64Data);
req.setFileId(fileId);
ModifyMediaInfoResponse resp = vodClient.ModifyMediaInfo(req);
if (StringUtils.isBlank(resp.getCoverUrl())) {
throw new CloudSDKException("Modify cover failed, response: " + ModifyMediaInfoResponse.toJsonString(resp));
}
return resp.getCoverUrl();
} catch (TencentCloudSDKException e) {
throw new CloudSDKException(e.getErrorCode(), e.getMessage(), e);
}
}
Aggregations