本文介绍了如何将文件上传到Web服务器(用C#编写)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,世界!



我用C#编写了一个(GUI)Web服务器。我可以访问索引文件并从服务器下载(或流)文件。但我不能上传到服务器,因为我不能写任何代码到POSTRequest()接受上传文件到服务器 - 我没有想法。





Hello, world!

I programmed a (GUI) Web Server in C#. I can access the index file and download (or stream) files from server. But I can''t upload to Server because I can''t write any code to POSTRequest() to accept uploading files to Server - I''m out of ideas.


if (Type.ToUpper() == "GET ") // IF THERE IS GET REQUEST
{
     GETRequest(buffer, Client); // private void GETRequest() code works OK
}


if (Type.ToUpper() == "POST") // IF THERE IS POST REQUEST
{
     POSTRequest(buffer, Client); // private void POSTRequest() -empty, have no ideas what to write here...
}









有人可以帮我写一篇文章C#中的代码(到服务器)接受从HTML上传文件





谢谢!





Can someone help me and write a piece of code in C# (to Server) to accept uploading files from HTML


Thanks!

推荐答案


这篇关于如何将文件上传到Web服务器(用C#编写)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 06:38
查看更多