How can we provide the path for the image file in order to create the multimedia component in server?

StackOverflow https://stackoverflow.com/questions/18096790

Question

I am trying to Create a multimedia Component where
1) I am executing my code in client machine
2)Target where it should create a component is one of the test server.
3)Here i am using the http Coreservices added as the Service Reference.

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:

Unable to get file size of 'file:///C:foldername/image.jpg'
Could not find a part of the path '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

In this case i am getting same error at component creation stage:

Unable to get file size of 'file:///Z:/foldername/image.jpg'
Could not find a part of the path 'Z:\foldername\image.jpg'.

My question is , How can we provide the path for the image file in order to create the multimedia component?

Was it helpful?

Solution

I got my answer and able to create the multimedia component to the target server: have used

StreamUpload2010Client streamClient = new StreamUpload2010Client();

and stored the file at templocation and uploaded it from there.

thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top