Click to See Complete Forum and Search --> : Uploading files


Usling
02-14-2003, 02:15 AM
How do you create a script that uploads files from the user to my server? I tried using a form that send the files path as a querystring to this script:

Dim Fil, Obj, Folder
Fil = Request.Querystring("fil")
Folder = "E:\Inetpub\wwwroot\upload\uploads\"

Set Obj = CreateObject("Scripting.FileSystemObject")
Obj.CopyFile Fil, Folder

It worked on my local pws, but I guess that was just becase the asp-file and the file I wanted to upload was on the same computer, right? When I try it on the real server, I get a 500 Internal server error.

Ribeyed
02-14-2003, 03:34 AM
hi,
here is a link for information regarding file upload from client to server:

http://www.aspfaq.com/show.asp?id=2189

If you are going to have problems getting components installed on your web server then post back and i will post you code i have to do this.

Hope this helps

Usling
02-20-2003, 07:44 AM
I get a hint of it, but I dont understand. Remember, I am still quite new to this.

But if you were to have only 2 documents, one where the user choosesthe file, and one that handles the uploading, what code would you put in each one of them? In the simplest of ways?