|
 |
asp_web_howto thread: Uploading a file from a form
Message #1 by tjwondergem@t... on Thu, 23 May 2002 16:44:53
|
|
I'm trying to upload a file from a form using ASP
Some snippets of my code:
<input type="file" name="theFile">
<%
Dim strFile 'As String for File Path
Dim FSO 'As FileSystemObject for Copying the file
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
strFile = Request.Form("theFile")
FSO.CopyFile(strFile, C:\files\, false)
FSO.Close
Set FSO = Nothing
%>
Am I way off here if I want to take that file and copy it to
my "C:\files" folder?
Does the source of the CopyFile() Method have to be a string?
Thanks much!
Tim
Message #2 by "H. Carter Harris" <carter@t...> on Thu, 23 May 2002 11:47:55 -0500
|
|
Try aspsmartupload ... its a free component and it works great!
-----Original Message-----
From: tjwondergem@t...
[mailto:tjwondergem@t...]
Sent: 23 May, 2002 4:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Uploading a file from a form
I'm trying to upload a file from a form using ASP
Some snippets of my code:
<input type="file" name="theFile">
<%
Dim strFile 'As String for File Path
Dim FSO 'As FileSystemObject for Copying the file
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
strFile = Request.Form("theFile")
FSO.CopyFile(strFile, C:\files\, false)
FSO.Close
Set FSO = Nothing
%>
Am I way off here if I want to take that file and copy it to
my "C:\files" folder?
Does the source of the CopyFile() Method have to be a string?
Thanks much!
Tim
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #3 by tjwondergem@t... on Thu, 23 May 2002 20:34:14
|
|
> Try aspsmartupload ... its a free component and it works great!
-----Original Message-----
From: tjwondergem@t...
[mailto:tjwondergem@t...]
Sent: 23 May, 2002 4:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Uploading a file from a form
I'm trying to upload a file from a form using ASP
Some snippets of my code:
<input type="file" name="theFile">
<%
Dim strFile 'As String for File Path
Dim FSO 'As FileSystemObject for Copying the file
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
strFile = Request.Form("theFile")
FSO.CopyFile(strFile, C:\files\, false)
FSO.Close
Set FSO = Nothing
%>
Am I way off here if I want to take that file and copy it to
my "C:\files" folder?
Does the source of the CopyFile() Method have to be a string?
Thanks much!
Tim
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #4 by "Duanchai Tayaborworn" <dtaya@y...> on Thu, 23 May 2002 23:53:59
|
|
There are 2 ways to upload files from ASP page
1) Pure ASP - More code, more skills
2) Using Third-party componant.
You can get the souce code and learn how to do it from
http://www.stardeveloper.com/articles/042501-1.shtml
It is really helpfull.
Hope it will help.
|
|
 |