Uploading a file from a local .net application through the HTML Form file upload feature (php server side)
I want to make a local program in C# that manages files between multiple users. I want to utilize the file upload option supported by HTML Form/PHP from within a .net application, but I'm not sure how to go about doing this. Even a starting point would be awesome开发者_Python百科.
All my google searches return using the HTML Form upload from within a web browser, but I'm looking to use the same upload feature directly from a local .net application.
Thanks
Kurru
The UploadFile function is a good starting point:
using (var client = new WebClient())
{
byte[] result = client.UploadFile(
"http://foo.com/upload.php",
@"c:\work\foo.txt"
);
}
精彩评论