I
Igor
Good afternoon,
I have an .htm page with "input type=file" box, as well as .asp page
to which that file is posted. It works. Since the path for the file to
be uploaded is constant, how can I use the current setup of .htm and
..asp pages to upload a file from a client machine without a utility. I
read on one of the forums that "hidden" field cannot be used for
files. If there is no way to use my current structure, I am also
looking into FSO object, using one .asp page to post to itself,
specifically .getFile method to start. What are the next steps to
take? The code for the single .asp page is below. File.move works
also, not sure if I need it though. Thank You, Igor.
<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.getfile("C:\_WebApps\igor\file_upload\scripts.txt")
'response.write file.name
file.move("C:\_WebApps\igor\file_upload\test\")
'file.copy("C:\_WebApps\igor\file_upload\test")
%>
<html>
<body>
<form name="upload_form" method="post" enctype="multipart/form-data"
action="upload_link_old.asp">
<input type="hidden" id="isdone" name="isdone" value></input>
<!--<input type=file>-->
<br>
<input type=submit value="Upload File">
</form>
</body>
</html>
<script type="javascript">
</script>
I have an .htm page with "input type=file" box, as well as .asp page
to which that file is posted. It works. Since the path for the file to
be uploaded is constant, how can I use the current setup of .htm and
..asp pages to upload a file from a client machine without a utility. I
read on one of the forums that "hidden" field cannot be used for
files. If there is no way to use my current structure, I am also
looking into FSO object, using one .asp page to post to itself,
specifically .getFile method to start. What are the next steps to
take? The code for the single .asp page is below. File.move works
also, not sure if I need it though. Thank You, Igor.
<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.getfile("C:\_WebApps\igor\file_upload\scripts.txt")
'response.write file.name
file.move("C:\_WebApps\igor\file_upload\test\")
'file.copy("C:\_WebApps\igor\file_upload\test")
%>
<html>
<body>
<form name="upload_form" method="post" enctype="multipart/form-data"
action="upload_link_old.asp">
<input type="hidden" id="isdone" name="isdone" value></input>
<!--<input type=file>-->
<br>
<input type=submit value="Upload File">
</form>
</body>
</html>
<script type="javascript">
</script>