【发布时间】:2014-11-01 04:46:41
【问题描述】:
我正在为一个 iphone 应用程序创建一个 wcf。我需要的是一个 POST,我将在其中使用图像和其他数据更新 sql。我知道如何获取数据,但我是更新图像的新手,有没有我可以浏览的示例并将其应用于我的项目。网上有很多 wcf 上传主题,但没有什么能接近我想要的。我所看到的只是上传到特定文件夹。我需要将它上传到sql。我对流一无所知。
using System.ServiceModel; using System.ServiceModel.Web; using System.IO; namespace RESTImageUpload {
[ServiceContract]
public interface IImageUpload
{
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "FileUpload{empid},{fileName}")]
void FileUpload(string empid,string fileName, Stream fileStream);
} }
【问题讨论】:
-
这是一个需求描述......
标签: c# sql json wcf image-uploading