ASP Hosting Top Header
Easy ASP Hosting Logo ASP.NET Hosting
ASP Hosting Contact Information
Windows Hosting
         Home         Hosting         Domains         Support          Order Windows 2003 Hosting
Helm Hosting
 

ASPUpload COM Object Sample

ASPUPload is an Active Server component which enables an ASP application to accept, save and manipulate files uploaded with a browser. The files are uploaded via an HTML POST form. More information can be found at http://www.aspupload.com

The following is a working sample of how this component works on Active Server hosting accounts. There are literally thousands of other combinations, colors, methods, etc that could be used to accomplish the same function. Please note that we do not provide support for this sample. It is only provided as a guide to help you get started.

All the ASP code is documented. What is not documented is the plain HTML tables which were added for aesthetic purposes.

You can enter your domain name (yourdomain.com, mydomain.com, etc.) in the following text box and click the "Customize" button and it will alter the code below for your specific web hosting account\domain name.

Your Domain Name


This is what the ASP code looks like:


*** PART 1 ***
Open you favorite text editor (Notepad, Wordpad, , copy and paste the following text into a new document and save it with the filename aspupload.asp, then upload the file to the wwwroot directory of your webspace on our servers.

<HTML>
     <BODY BGCOLOR="#FFFFFF">
          <FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="aspupload2.asp">
                    <INPUT TYPE="FILE" SIZE="40" NAME="FILE1"><BR>
                    <INPUT TYPE=SUBMIT VALUE="Upload!">
          </FORM>
     </BODY>
</HTML>



*** PART 2 ***
Open you favorite text editor (Notepad, Wordpad, , copy and paste the following text into a new document and save it with the filename aspupload2.asp, then upload the file to the wwwroot directory of your webspace on our servers.

<HTML>
     <BODY>
          <%
          Set Upload = Server.CreateObject("Persits.Upload")
          Count = Upload.Save("c:\domains\yourdomain.com\wwwroot")

          For Each File in Upload.Files
              Ext = UCase(Right(File.Path, 3))
              If Ext <> "JPG" and Ext <> "PNG" and Ext <> "GIF"and Ext <> "PDF" Then
                  File.Delete
              End If
              Next
          
          Response.Write Count & " file(s) uploaded to c:\domains\yourdomain.com\wwwroot"
          %>
     </BODY>
</HTML>


And this is what it looks like in a web browser:

*** PART 1 ***


*** PART 2 ***

 

Home |  Hosting |  Resellers |  About Us |  Testimonials |  Site Map |  Contact Us |  Data Center |  Plesk |  Support |  Announcements |  Order