【发布时间】:2017-06-10 12:06:03
【问题描述】:
我正在尝试创建 wcf 服务,该服务将上传 pdf、doc、xls、图像等文件,但 pdf、txt 文件正在上传和正确打开,但是当我尝试上传图像文件时,文件是正在上传,但图片不可见
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "Upload/{fileName}")]
string Upload(string fileName, Stream fileContents);
using (FileStream fs = new FileStream("my path", FileMode.Create))
{
fileContents.CopyTo(fs);
fileContents.Close();
}
【问题讨论】:
标签: web-services rest api wcf image-upload