------ Solution ---------------------------------------- ----
landlord positive solution, I think it is a single case caused. .
------ Solution ---------------------------------------- ----
Well , the default is 2M, 2M I upload more than the failure of normal, but I then I will not be able to re- upload , you must restart tomcat was back to normal , I really do not understand ah ! ! !
landlord from the landlord's point of view should be used to describe the spring to manage the action, if it is, then check the landlord 's scope is not your action is not set to the default prototype is a singleton you once error occurs , the latter are this action can not be into it. Front determine file size of the file js code below
singleton pattern . I understand ! ! ! Thank you ! Detect file size code, which Google Firefox can, but IE's display can not create object, how is it ?
var file=document.getElementById("file");
if(navigator.userAgent.indexOf("MSIE")!=-1){//IE下要用ActiveX控件
var fos=new ActiveXObject("Scripting.FileSystemObject");
var f=fos.GetFile(file.value);
alert(f.size);
}else{//firefox和google的直接用
alert(file.files[0].size);
}
IE to use activeX controls disabled if you set up a course, ie can not create the object
------ For reference only ----------------- ----------------------
http://blog.csdn.net/withiter/article/details/7272338
------ For reference only ------------- --------------------------
this is not what I want
------ For reference only ---------------------------------------
this is not what I want of
there are a judge upload file size .
jquery directly judge :
function findSize(field_id)
{
var fileInput = $("#"+field_id)[0];
byteSize = fileInput.files[0].fileSize;
return ( Math.ceil(byteSize / 1024) ); // Size returned in KB.
}
------ For reference only ----------------------------------- ----
previously struts2 when seemingly maximum to support 2M. . . .
------ For reference only ---------------------------------- -----
Well , the default is 2M, 2M I upload more than the failure of normal, but I then I will not be able to re- upload , you must restart tomcat was back to normal , I really do not understand ah ! ! !
------ For reference only -------------------------------------- -
Well , the default is 2M, 2M I upload more than the failure of normal, but I then I will not be able to re- upload , you must restart tomcat was back to normal , I really do not understand ah ! ! !
landlord from the landlord's point of view should be used to describe the spring to manage the action, if it is, then check the landlord 's scope is not your action is not set to the default prototype is a singleton you once error occurs , the latter are this action can not be into it. Front determine file size of the file js code below
var file=document.getElementById("file");
if(navigator.userAgent.indexOf("MSIE")!=-1){//IE下要用ActiveX控件
var fos=new ActiveXObject("Scripting.FileSystemObject");
var f=fos.GetFile(file.value);
alert(f.size);
}else{//firefox和google的直接用
alert(file.files[0].size);
}
------ For reference only ----------------------------------- ----
this is not what I want
there are a judge upload file size .
jquery directly judge :
this does not work , the test does not pass !
function findSize(field_id)
{
var fileInput = $("#"+field_id)[0];
byteSize = fileInput.files[0].fileSize;
return ( Math.ceil(byteSize / 1024) ); // Size returned in KB.
}
------ For reference only -------------------------------------- -
Well , the default is 2M, 2M I upload more than the failure of normal, but I then I will not be able to re- upload , you must restart tomcat was back to normal , I really do not understand ah ! ! !
then I 'd not only failed to upload it. . .
tomcat still running. . .
Also if there is a modified configuration can support up to 10M, which is was accidentally know , did not specifically to remember . The landlord can then go to Soso bar, found to also share to me.
------ For reference only -------------------------------------- -
finally met a cow ! ! ! ! ! ! ! Really sharply ah ! I'm a beginner, you do not say I really do not know ! This problem has troubled me a lot of hours .
------ For reference only -------------------------------------- -
Well , the default is 2M, 2M I upload more than the failure of normal, but I then I will not be able to re- upload , you must restart tomcat was back to normal , I really do not understand ah ! ! !
landlord from the landlord's point of view should be used to describe the spring to manage the action, if it is, then check the landlord 's scope is not your action is not set to the default prototype is a singleton you once error occurs , the latter are this action can not be into it. Front determine file size of the file js code below
singleton pattern . I understand ! ! ! Thank you ! Detect file size code, which Google Firefox can, but IE's display can not create object, how is it ?
var file=document.getElementById("file");
if(navigator.userAgent.indexOf("MSIE")!=-1){//IE下要用ActiveX控件
var fos=new ActiveXObject("Scripting.FileSystemObject");
var f=fos.GetFile(file.value);
alert(f.size);
}else{//firefox和google的直接用
alert(file.files[0].size);
}
没有评论:
发表评论