Skip to content

Instantly share code, notes, and snippets.

@imwower
Created June 20, 2014 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imwower/292e8c565a5023bdf044 to your computer and use it in GitHub Desktop.
Save imwower/292e8c565a5023bdf044 to your computer and use it in GitHub Desktop.
try
{
string source = "1.png";
WebClient client = new WebClient();
NetworkCredential nc = new NetworkCredential("test", "test");
Uri addy = new Uri(@"\\192.168.57.182\Upload\" + source);
client.Credentials = nc;
byte[] arrReturn = client.UploadFile(addy, "1.png");
}
catch (Exception e)
{
throw;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment