且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Request.Files [""]回头率空

更新时间:2023-02-25 13:21:11

IIRC Uploadify 使用 FILEDATA 作为参数。所以:

IIRC Uploadify uses fileData as parameter. So:

var theFile = Request.Files["fileData"];

甚至更好:

[HttpPost]
public ActionResult UploadFile(HttpPostedFileBase fileData)
{          
    // The fileData parameter should normally contain the uploaded file
    // so you don't need to be looking for it in Request.Files
    return Json("Success", JsonRequestBehavior.AllowGet);
}

当然,如果你不喜欢这个名字,你可以随时使用 fileObjName 设置。