Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Uploading files using ASPUpload 1.50


Message #1 by "Dimitri Dhont" <ddhont@e...> on Fri, 30 Nov 2001 11:28:10
Hi,



I'm currently working on the menace of every webmaster: File uploading.

I have no previous expirience in this field, so I downloaded ASPUpload 1.5.

Here's the problem: The files are uploaded, but not to the folder I specify.

when I request the path (Response.write objUpload.Path)  I get a backslash

Anyway here's the code:



***********FORM***********************

<form action="upload_process.asp" method="post" enctype="multipart/form-data">

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

<input type="submit" value="upload">

</form>

**************************************



*************ASP script*****************

Dim FileName, objUpload



Set objUpload = server.CreateObject("ASPUpload.clsUpload")

objUpload.Path = "E:\iis\efssnet_dev\upload"

objUpload.FileName = objUpload.Form("FileName")



If objUpload.Save then

	Response.write ("File saved as: " & objUpload.Path & objUpload.FileName)

Else

	Response.write ("Error uploading file: " & objUpload.Error)

End if

*************************************



Thanks!

Dimitri

  Return to Index