我有一个要求,我需要下载多媒体组件的二进制文件,但是当我访问BinaryContentData
类公开的属性时,没有下载图像文件的属性。虽然对于上传文件,核心服务有一个属性,即UploadFromFile
.
那么有没有办法将二进制文件下载到临时位置。下面是我正在使用的代码:
core_service.ServiceReference1.SessionAwareCoreService2010Client client = new SessionAwareCoreService2010Client();
client.ClientCredentials.Windows.ClientCredential.UserName = "myUserName";
client.ClientCredentials.Windows.ClientCredential.Password = "myPassword"; client.Open();
ComponentData component = (ComponentData)client.TryCheckOut(
multimediaComponentURI, new ReadOptions());
BinaryContentData binaryData = component.BinaryContent;
请建议。