上传文件WCF [英] upload file wcf

查看:138
本文介绍了上传文件WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将创建一个WCF上传文件,如图片或PDF文件,以德服务器。 我怎样才能创建一个可以处理这个功能的服务? 我试图谷歌上搜索一下,但大多数文章告诉我使用流作为服务参数。但我要的是用字节[](数组)的文件内容。因为,这项服务不仅访问使用.nte框架,但也使用其它技术,如PHP,JAVA,客观-C等。

I'll create an WCF for uploading file such as images or pdf files to te server. How can I create a service that can handle this function ? I tried to googling about it, but most of article told me to use Stream as service parameter. But what I want is using byte[] (array) for the file content. because, this service is not only accessing using .nte framework, but also using other technologies, such as php, java, objective-c, etc.

任何帮助?

推荐答案

好像流是唯一的选择。看到这个 [MSDN示例]

Seems streaming is your only option. See this [MSDN example]

看到这一问题: 如何将文件上传到WCF服务?

您可以看看这篇文章: <一href="http://blogs.msdn.com/b/carlosfigueira/archive/2008/04/17/wcf-raw-programming-model-receiving-arbitrary-data.aspx" rel="nofollow">http://blogs.msdn.com/b/carlosfigueira/archive/2008/04/17/wcf-raw-programming-model-receiving-arbitrary-data.aspx

You could check out this article: http://blogs.msdn.com/b/carlosfigueira/archive/2008/04/17/wcf-raw-programming-model-receiving-arbitrary-data.aspx

据接收任意数据在谈论刚刚安装WCF服务,你可以从任何客户端(PHP,JAVA等)

It talks about just setup WCF Service for receiving arbitrary data, and you can POST from any client (php,java etc)

这篇关于上传文件WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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