You need a JavaScript-enabled browser to view this site.
  Web Hosting Support   Company News
 

AspUpload

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 using the <input type=file> tag. The AspUpload component is invoked by an ASP script located on a Windows NT/2000 server running Internet Information Server (IIS).

For AspUload you would need a HTML forms page. Let's create a simple HTML form which will let us upload up to three files, and a script to handle the uploading.

This is the HTML file called test.asp:

<html>
<body bgcolor="#ffffff">

<form method="POST" enctype="multipart/form-data" action="uploadscript.asp">
<input type=file size=60 name="file1"><br>
<input type=file size=60 name="file2"><br>
<input type=file size=60 name="file3"><br>
<input type=submit value="Upload!">
</form>
</body>
</html>

Notice the ENCTYPE="multipart/form-data" attribute in the FORM tag. It instructs the browser to send the entire file to the server and not just the file name entered in the input text box. It is absolutely mandatory that your uploading forms contain this attribute, or no uploading can be performed.

Let us now look at the corresponding uploading script uploadscript.asp:

<html>
<body>
<% Set Upload = Server.CreateObject("Persits.Upload.1")
Count = Upload.SaveVirtual("virtual_directory_name") %>
<% = Count %> files uploaded.
</body>
</html>

The first line of the ASP script simply creates an instance of the AspUpload object. The second line calls the Save method of the component which actually does the job: it parses the posting received from the browser, figures out how many files are being uploaded, and saves them in the specified directory. All the files will be saved in the directory specified under their original names. The Save method returns the number of files successfully uploaded. In case of an error this method will throw an exception.

It is important that you let us know what directory you would like the files to be uploaded so that we can set the right permissions for you on that directory.
mailto:support@imageaid.net?subject=Change permission on the folder for ASPUpload

You can now go ahead and try to upload a few files. You can use any or all of the input boxes on your form. AspUpload is smart enough to figure out which input boxes are used and which are not.

 

Flash Games
We've jumped on the Flash games bandwagon and are starting to release some of our games for your enjoyment. We're just getting our feet wet, so the games are starting out simple! Check out our games page to see what's available.

 
Featured Project

Ouray Vacations—Mountain Getaways

Ouray Vacations WebsiteImageAid recently completed and launched the innnagural Web site for OurayVacations.com. The site promotes vacation opportunities and activities in Ouray, Colorado, 'The Switzerland of America.' The site integrates HTML with XML and Flash, creating a usable, dynamically driven site.

In the coming months, we will be launching a PHP- and MySQL-driven property promotion and reservation system. This application will enable local property management firms to easily and efficiently oversee their vacation rentals.

Planning your trip to Ouray, Colorado, is now as easy as visiting www.ourayvacations.com.

 
Search Form

Topic:

Show Page Summaries