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)

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

Form Upload Page:

<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!" />