Persits ASPUpload sample code

Programming, error messages and sample code > sample code
Persits ASPUpload sample code

Filename: aspupload1.asp Please ensure that /aspupload directory exist on your site before trying to upload the files. You can also change it to any other directory in the code below.
(referred to by Form Upload Page below)

<HTML> 
<BODY> 
<
Set Upload = Server.CreateObject("Persits.Upload") 
count = upload.savevirtual ("/aspupload") 
Response.Write Count & " file(s) uploaded" 
%> 
</BODY> 
</HTML> 

Form Upload Page:

<html> 
<head> 
</head> 
<body bgcolor="#ffffff"
    <form action="aspupload1.asp" method="post" enctype="multipart/form-data"
        <input type="file" size="40" name="FILE1" /> 
        <br /> 
        <input type="submit" value="Upload!" /> 
    </form> 
</body> 
</html>