Search code examples
c#uploadwindows-server-2008

Upload image or files to folder in local server


How I can upload image or files to folder in local server C# Windows application? I prefer this method instead of saving the images to the database because it makes heavy.

I am using Windows Server 2008, please help me to get articles or tutorials to accomplish this.


Solution

  • The best way, IMO, would be to use FTP. See here for an example of how to do that.

    Note, that you will need a good FTP server running on your server computer (I, personally, like FileZilla.

    ANOTHER (likely easier) way would be to use SMB. You would have to open up a SMB share on the server for the folder which you want to upload the image too. this question has some example code of how you upload a file using SMB.