|
The Active Server Page simply creates an XForm object and saves
the uploaded file out as myupload.dat.
By default the filename is virtual - a URL relative to the
current page - so the file will be saved in the same directory as
the basicupload pages. You can specify absolute pathnames if you
set the XForm AbsolutePathname property to True.
Before we save we set the XForm Overwrite property to True. This
ensures that we overwrite any existing file we may have previously
uploaded. We also check that the user has selected a file to
upload.
<% @Language="VBScript" %>
<%
Set theForm = Server.CreateObject("ABCUpload4.XForm")
theForm.Overwrite = True
If theForm.Files("filefield").FileExists Then
theForm.Files("filefield").Save
"myupload.dat"
End If
%>
<html>
<body>
File uploaded...
</body>
</html>
|