uploading to images to remote server
-
hi all, i would like to write C# code that would allow a user to upload images to a file on a remote server any ideas or solutions for me pleez. this would require ftp access and i am uncertain how i am going to integrate this into the app. the idea is the to upload new images when the need arises... many thanks butchzn
-
hi all, i would like to write C# code that would allow a user to upload images to a file on a remote server any ideas or solutions for me pleez. this would require ftp access and i am uncertain how i am going to integrate this into the app. the idea is the to upload new images when the need arises... many thanks butchzn
Uploading files greatly depends on what the server protocol is. If you're using HTTP, for example, the
HttpWebRequest
already supports this. Since you're requiring FTP, realize that the current .NET BCL has no FTP support - but don't let that stop you. Some articles on this site and others have simply wrapped the ftp.exe application in a class library. This is dodgy and not very well designed. A proper design - likeHttpWebRequest
andHttpWebResponse
- would extendWebRequest
andWebResponse
, classes for pluggable protocols. It just so happens that there's a good example in the Microsoft Knowledge Base: http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3B812409[^]. It has a link at the bottom to GotDotNet (a Microsoft developer community site) with the full source. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]