ExtJs 2.0 + Ext.ux.UploadDialog + monorails + asp.net
使用Ext.ux.UploadDialog创建上传,默认maxRequestLength时,能正确控制上传文件的大小,设置maxRequestLength = 1048576可以上传20多Mb的文件,了,可是到30多Mb的文件就无法上传了,Ext.ux.UploadDialog创建的dialog指定的url不能跳转了,30Mb以下的文件是可以正确跳转的,可以我的maxRequestLength已经设到了很大了啊,应该可以传几百兆的文件才对啊,内存是2G,系统vista,machine config的 memorylimit已经设为了90,可还是无法跳转到url指定的方法里,那样就没有办法运行后台的上传代码了。。救救我!各位大哥
js代码
dialog = new Ext.ux.UploadDialog.Dialog({
url: 'CreateMedia.rails',
reset_on_hide: false,
base_params:
{
pMediaName:medianame,
pMediaTypeId:mtid,
pFileName:filename,
ptitle:title
},
upload_autostart: true
});
dialog.show('show-button');
controller控制器的代码
[Cache(System.Web.HttpCacheability.Public, Duration = 120)]
public void CreateMedia(string pMediaName, int pMediaTypeId, string pFileName, string ptitle)
{
string pFileURL = null;
if (HttpContext.Current.Request.Files.Count > 0)
{
HttpPostedFile postedFile = HttpContext.Current.Request.Files[0];
string savePath = HttpContext.Current.Server.MapPath(@"~/Files/"); savePath += pFileName;
postedFile.SaveAs(savePath);
}
}
使用Ext.ux.UploadDialog创建上传,默认maxRequestLength时,能正确控制上传文件的大小,设置maxRequestLength = 1048576可以上传20多Mb的文件,了,可是到30多Mb的文件就无法上传了,Ext.ux.UploadDialog创建的dialog指定的url不能跳转了,30Mb以下的文件是可以正确跳转的,可以我的maxRequestLength已经设到了很大了啊,应该可以传几百兆的文件才对啊,内存是2G,系统vista,machine config的 memorylimit已经设为了90,可还是无法跳转到url指定的方法里,那样就没有办法运行后台的上传代码了。。救救我!各位大哥
js代码
dialog = new Ext.ux.UploadDialog.Dialog({
url: 'CreateMedia.rails',
reset_on_hide: false,
base_params:
{
pMediaName:medianame,
pMediaTypeId:mtid,
pFileName:filename,
ptitle:title
},
upload_autostart: true
});
dialog.show('show-button');
controller控制器的代码
[Cache(System.Web.HttpCacheability.Public, Duration = 120)]
public void CreateMedia(string pMediaName, int pMediaTypeId, string pFileName, string ptitle)
{
string pFileURL = null;
if (HttpContext.Current.Request.Files.Count > 0)
{
HttpPostedFile postedFile = HttpContext.Current.Request.Files[0];
string savePath = HttpContext.Current.Server.MapPath(@"~/Files/"); savePath += pFileName;
postedFile.SaveAs(savePath);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货