Set Upload = Server.CreateObject("Persits.Upload.1")

Upload.OverwriteFiles = False
On Error Resume Next

Upload.SetMaxSize 1048576 ' Limit files to 1MB
Count = Upload.Save(Server.MapPath("../aspupload"))

<% If Err <> 0 Then %>

<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<H3>The following error occured while uploading:</h3>

<FONT SIZE=3 FACE="Arial" COLOR=#FF2020>
<h2>"<% = Err.Description %>"</h2>

<FONT SIZE=2 FACE="Arial" COLOR="#0020A0">
Please <A HREF="aspupload.asp">try again</A>.

<% Else %>
<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<h2>Success! <% = Count %> file(s) have been uploaded.</h2>

<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<TH BGCOLOR="#FFFF00">Uploaded File</TH><TH BGCOLOR="#FFFF00">Size</TH><TH BGCOLOR="#FFFF00">Original Size</TH><TR>
<% For Each File in Upload.Files
<TD><B><% = File.OriginalPath %></B></TD>
<TD ALIGN=RIGHT VALIGN="TOP"><% =File.Size %> bytes</TD>
<TD ALIGN=RIGHT VALIGN="TOP"><% =File.OriginalSize %> bytes</TD><TR>
<% Next %>
<FONT SIZE=2 FACE="Arial" COLOR=#0020A0>
Click <A HREF="aspupload.asp">here</A> to upload more files.
<% End If %>