C#相当于java中的MultipartEntity [英] C# equivalent of MultipartEntity in java
问题描述
java中多部分实体的C#等价物是什么?我有一个用于将图像上传到webserver的java代码如下所示。我需要相应的c#代码。
MultipartEntity mpEntity = new MultipartEntity();
ContentBody cbFile = new FileBody(file,image / jpeg);
mpEntity.addPart (filename,cbFile);
HttpPut put = new HttpPut(http://example.com/+ filename);
put.setEntity(mpEntity); < br $>
请解释锄头在c#中使用它。
谢谢
这样的事情:http://www.redmountainsw.com/wordpress/2012/09/19/asynchronous-multipart-post-with-c/ [ ^ ]?
What is the C# equivalent of multipart entity in java?I have a java code for uploading images into webserver shown below.I need the corresponding c# code.
MultipartEntity mpEntity = new MultipartEntity();
ContentBody cbFile = new FileBody(file, "image/jpeg");
mpEntity.addPart(filename, cbFile);
HttpPut put = new HttpPut("http://example.com/"+filename);
put.setEntity(mpEntity);
please explain hoe to use this in c#.
Thanks
Something like this: http://www.redmountainsw.com/wordpress/2012/09/19/asynchronous-multipart-post-with-c/[^]?
这篇关于C#相当于java中的MultipartEntity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!