测试,服务端项目文件夹收到图片
iOS客户端主要代码
C#服务端主要代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace RemoteImage
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Files.Count == 0)
{
Response.Write("none file");
}
else
{
HttpPostedFile file = Request.Files["img"];
String filename = Request.Form["filename"];
file.SaveAs(MapPath("~/" + filename + ".png"));
Response.Write("ok");
}
}
}
}