目前我有一个包含图像文件所有数据的 byte[]
,我只想构建一个 HttpPostedFileBase
的实例,以便我可以使用现有的方法,而不是创建一个新的重载。
public ActionResult Save(HttpPostedFileBase file)
public ActionResult Save(byte[] data)
{
//Hope I can construct an instance of HttpPostedFileBase here and then
return Save(file);
//instead of writing a lot of similar codes
}