Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to save posted image to a different server ?

Status
Not open for further replies.

thakral

Technical User
Sep 6, 2002
16
TH
I have got a small page which simply allows user to upload a picture to the server

I use a HTMLInput control called file then ..
Code:
path = this.MapPath("")+"\\images\\";
file.PostedFile.SaveAs(path+filename);

this helps me save the file to the server from which this page is invoked say for e.g. server .11

What i am trying to accomplish is when user clicks on upload .. it saves to .11 as above and also to a folder in another server e.g. .12 Is there any class in .NET that can help accomplish this or any suggestions ?
Thanks
 
It seems like as long as the permissions are set up right on a network share, all you'd have to do is type the proper path, e.g., "\\Server2\SharedFolder".
 
HI BoulderBum
Thanks for replying ... i tried using "\\xxx.xxx.xxx.xxx\..\..\images\photo.gif" to send the files but apparently it tried to look for a folder with the following structure on local machine i.e. .11 server "c:\winnt\system32\xxx.xxx.xxx.xxx\..\..\images\" and threw out an error coz there is no such folder.
So i had to use a different approach to solve it .. In case anyone is interested here's how it is ..
Create a webservice on .12 (already had a webservice running so just added a function to process this part) pass in the image as binary stream and have the function on .12 write it to disk ..
X---------------------X-------------------X
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top