ASP Upload

J

John Smith

Hi,

I'm using the Persists ASPUpload component to upload files to various
sub-directorys in the root of my website. I have written a short bit of code
for this but it always uploads to the root directory. Anyone know where i'm
going wrong ?

Thanks

John


---------------------html that sends to ASP ---------------------

<form action="upload.asp?upload=yes" method="post"
ENCTYPE="multipart/form-data">
<input type="file" name="file">
<select name="folder">
<option value="folder_one">Folder One</option>
<option value="folder_two">Folder Two</option>
</select>
<input type="submit" name="Submit" value="Upload">

---------------------ASP--------------------
If Request.QueryString("upload")="yes" Then

Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = False
Upload.SetMaxSize 1048576

strFolder = Upload.Form("folder")
strPath = "d:\home\bloggs\public_html\" & strFolder
Upload.Save(strPath)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top