Upload files with HTTPWebrequest (multipart/form-data)

后端 未结 21 2490
独厮守ぢ
独厮守ぢ 2020-11-21 04:53

Is there any class, library or some piece of code which will help me to upload files with HTTPWebrequest?

Edit 2:

I do not

21条回答
  •  礼貌的吻别
    2020-11-21 05:16

    My ASP.NET Upload FAQ has an article on this, with example code: Upload files using an RFC 1867 POST request with HttpWebRequest/WebClient. This code doesn't load files into memory (as opposed to the code above), supports multiple files, and supports form values, setting credentials and cookies, etc.

    Edit: looks like Axosoft took down the page. Thanks guys.

    It's still accessible via archive.org.

提交回复
热议问题