0
我用Valums在MVC3 Razor下上传大文件。MVC3大文件上传器问题
不知怎么它只上传约1Mb的小文件。
我已经使用这应该是很好的Large File Uploads Fails in Chrome with Valums
但它并不能帮助web.config设置。
这里是我的JS
<script type="text/jscript">
var uploader = new qq.FileUploader({
element: document.getElementById('file-uploader-demo1'),
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
sizeLimit: 1024*1024*1024,
action: '/Test/UploadFile',
multiple: false,
onSubmit: function (id, filename) {
this.params.param1 = $("#ImageTitle").val();
},
onProgress: function (id, fileName, loaded, total) {
// $('.qq-upload-list').hide();
},
onComplete: function (id, fileName, responseJSON) {
$('.qq-upload-list').hide();
$("#ImageTitle").val("");
genTable(responseJSON);
}
});
function genTable(data) {
var contentData = '';
contentData += "<img class='myclass' src='/Test/Orders/thumb-" + data + "' />";
$("#ImageList").html(contentData);
}
window.onload = createUploader;
</script>
这里是我的web.config
<httpRuntime
maxRequestLength="1024000"
requestLengthDiskThreshold="1024000"
executionTimeout="18000"
/>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
请看看我的web.config我刚刚更新了问题。谢谢! – 2012-03-24 21:07:53
请求限制在'web.config'中以明确的方式设置。只需增加该值('maxRequestLength =“1024000”')。 – 2012-03-24 21:27:06
但是我在web.config中有maxRequestLength =“1024000”。它仍然不起作用 – 2012-03-24 21:29:49