tags:

views:

165

answers:

4

I am trying to find out how to upload a file from a web user to a server using an ASP page. The displayed page has an Input tag of type "File" like this:

<input type="file" name="uploadfile">

And a submit button that passes the Form info to another .ASP page. This page must take the path it gets from the Input control and use it to somehow save the file to the server.

I keep thinking there must be a common way to do this, since I see this kind of thing on a number of websites, but how is it done? Is there some sort of server object that can be called for it?

+1  A: 

This script will help you.

Also, you may google for "asp upload file" - there are tons of results.

Sunny
+1  A: 

If you are doing any serious uploading or have a commercial product you really need to use a COM component in classic asp. Check out SA-FileUp. It has been the defacto standard for this since like forever.

DancesWithBamboo
A: 

If your hosting service doesn't allow you to install components, you may also want to look at this script:

http://chris.brimson-read.com.au/index.php?option=com_content&amp;view=article&amp;id=6&amp;Itemid=7

I've seen a wide variety of upload scripts floating around, and they ... vary ... in quality. I've not used the script in the selected answer, but its worth trying a few different options.

AnonJr
A: 

I can recommend SA-FileUp and Dundas Upload. They both are easy to install and have good tutorials on how to implement.

Espen