Multi-File upload solution at the same time in ASP

Source: Internet
Author: User
Tags count file size file upload
Solution | upload

Upload the form as follows:

Title:Gender:ManFemale belonging to:LiteratureSportsArtOtherWhether to select:Content: Category:Category 1Category 2Category 3Category 4Category 5<textarea name="content1" rows="10" cols="60"></textarea>Select File One:Select File Two:Select File Three:Select File Four:Select File Five:

ASP Source code:

<HTML>
<BODY>
<TITLE> File Upload </TITLE>
<CENTER>
</CENTER>
<% Set Obj = Server.CreateObject ("Yousoft.uploadfile")
Response.Write "Total upload" & obj. Count & "File <br> total data size" & obj. TotalBytes & "Bytes<br> spent a total of time" & (obj. spendtime/1000) & "SEC <br>"
Response.Write Obj.version%>
<HR>
<table width= "75%" border= "1" >
<tr>
&LT;TD width= "20%" > title:</td>
&LT;TD width= "80%" ><%=obj.form ("Title1")%></td>
</tr>
<tr>
&LT;TD width= "20%" > Belong to:</td>
&LT;TD width= "80%" ><%=obj.form ("Sel1")%></td>
</tr>
<tr>
&LT;TD width= "20%" > Sex:</td>
&LT;TD width= "80%" ><%=obj.form ("Sex1")%></td>
</tr>
<tr>
&LT;TD width= "20%" > Classification:</td>
&LT;TD width= "80%" ><%=obj.form ("List1")%></td>
</tr>
<tr>
&LT;TD width= "20%" > Content: </td>
&LT;TD width= "80%" ><%=obj.form ("Content1")%></td>
</tr>
<tr>
&LT;TD width= "20%" > Selected:</td>
&LT;TD width= "80%" ><%=obj.form ("Select1")%></td>
</tr>
<tr>
&LT;TD width= "20%" > Submit button:</td>
&LT;TD width= "80%" ><%=obj.form ("Save")%></td>
</tr>
</table>
<p> </p>
<p> upload files as follows:<br>
</p>
<table border= "1" >
<tr>
&LT;TD nowrap> name </td>
&LT;TD nowrap> file name (including extension) </td>
&LT;TD nowrap> file name (not including extension) </td>
&LT;TD nowrap> File Size (B) </td>
&LT;TD nowrap> Original file path </td>
&LT;TD nowrap> file name extension </td>
&LT;TD nowrap> Original file name (including path) </td>
</tr>
<%for i=0 to Obj.count-1%>
<% userfile = Obj.userfile (i)%>
<tr>
<td>
<% =userfile%>
</td>
<td>
<% =obj.filename (userfile)%>
</td>
<td>
<% =obj.filenamex (userfile)%>
</td>
<td>
<% =obj.filesize (userfile)%>
</td>
<td>
<% =obj.filepath (userfile)%>
</td>
<td>
<% =obj.fileext (userfile)%>
</td>
<td>
<% =obj.oldfilename (userfile)%>
</td>
</tr>
<% ' Obj.savetoftp "192.168.7.168", 21,5000, "Xu", "Xu", 0



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.