开发者

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"
    );
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜