Upload file upload has been very inconvenient, according to the site existing articles, most of the data from the client, to decompose, take a variety of information, I try to consider from another angle: The client take the file information, and then upload, example code as follows:
<script languge= "javascript" type= "Text/javascript" >
function Oncleck ()
{
Filename=document.getelementbyid ("File01"). Value
if (filename== "")
Alert ("Enter the file to upload")
Else
{
var filetype=new String (filename);
var i;
I=filetype.length;
Filetype=filetype.substring (I-4,i);
var theform;
Theform=document.getelementbyid ("form01");
theform.action= "Savefile.asp?filetype=" +filetype;
return true;
}
return false;
}
function Checkfile ()
{
if (parent.window.document.getElementById ("filename"). value!= "")
{
Alert ("File already uploaded!") ")
return false;
}
}
</script>
<body topmargin= "0" bgcolor= "#EDF1F1" leftmargin= "0" >
<form id=form01 method=post enctype= "Multipart/form-data" onsubmit= "return Oncleck ()" >
<input type=file name=file01 size=20 id=file01-------------------------------------------
Filetype=request ("filetype")
%>
This will get the file suffix name, if you will be flexible, you can also combine to obtain more file information, such as: file name, etc.
Note: The key understanding why you can