C#相当于java中的MultipartEntity [英] C# equivalent of MultipartEntity in java

查看:311
本文介绍了C#相当于java中的MultipartEntity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆