[英]How can we provide the path for the image file in order to create the multimedia component in server?
I am trying to Create a multimedia Component where 我正在尝试创建一个多媒体组件,其中
1) I am executing my code in client machine 1)我正在客户端计算机中执行我的代码
2)Target where it should create a component is one of the test server. 2)应该在其中创建组件的目标是测试服务器之一。
3)Here i am using the http Coreservices added as the Service Reference. 3)这里我使用的是http Coreservices作为服务参考。
but the part in which i am getting error is the path for the image file for the multimedia component. 但是我出错的部分是多媒体组件的图像文件的路径。
Case:1) I am selecting the Image file from the client machine - In this case i am getting error in the component creation stage stated: 情况:1)我从客户端计算机选择映像文件-在这种情况下,在所述组件创建阶段出现错误:
Unable to get file size of 'file:///C:foldername/image.jpg'
无法获得“ file:/// C:foldername / image.jpg”的文件大小
Could not find a part of the path 'C:\\foldername\\image.jpg'.找不到路径“ C:\\ foldername \\ image.jpg”的一部分。
Case:2) I mapped the test Server in client machine so it created the Z drive and i am selecting the image file 情况:2)我在客户机上映射了测试服务器,因此它创建了Z驱动器,并且我正在选择映像文件
In this case i am getting same error at component creation stage: 在这种情况下,我在组件创建阶段遇到了相同的错误:
Unable to get file size of 'file:///Z:/foldername/image.jpg'
无法获得“ file:/// Z:/foldername/image.jpg”的文件大小
Could not find a part of the path 'Z:\\foldername\\image.jpg'.找不到路径“ Z:\\ foldername \\ image.jpg”的一部分。
My question is , How can we provide the path for the image file in order to create the multimedia component? 我的问题是, 我们如何提供图像文件的路径以创建多媒体组件?
I got my answer and able to create the multimedia component to the target server: have used 我得到了答案,并能够为目标服务器创建多媒体组件:
StreamUpload2010Client streamClient = new StreamUpload2010Client();
StreamUpload2010Client streamClient =新的StreamUpload2010Client();
and stored the file at templocation and uploaded it from there. 并将文件存储在临时位置,然后从那里上传。
thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.