I am creating a file copy program in ASP classic for our subject. It works fine in IE but not in firefox. I need to let the user browse for a file using input type file but whenever i get the value, it only returns the filename not the complete path(In firefox). I search the internet but no luck. Is there any other way to do this?
Thanks in advance
<%
if (Request.Form("btnSave")<>"" )then
dim fis
Set fis = Server.createobject("Scripting.FileSystemObject")
Response.write(Request.Form("txtPath"))
dim path
path= Server.Mappath("\sample\images") & "\"
Response.write(path)
dim source
source =Request.Form("txtPath")
response.write(source)
fis.CopyFile source, path
set fso = nothing
End If
%>
You need to use a file upload input control and post it to the page using
Checkout this link for a tutorial: ASP File Upload Example