Fog Creek Software
Discussion Board

Form post a file to a different server

Anyone ever post a file to a server outside your network using a form.  I have a feeling this is very simple but I haven't done it before and I am struggling.  We have a .pdf that is generated locally that must be posted to the client server via web form.  I am using classic ASP and VB6.  Any help, would be really appreciated.


Thursday, July 3, 2003

eh? from your web server or from the client?
just make sure the "action" param on the form is correct, and the client will do it. on the server, look at the serverxmlhttp object.

Thursday, July 3, 2003

So I should just do something like:

<form method=post action=FormSave.asp enctype="multipart/form-data">
<input type=text name=strFile value="http:\\myServer\XMLTest\search.htm">
<input type=submit name=submit value="Submit">

And the client should be responsible for handling it?  I got the impression that I should also write the script to handle it to reside on the client server.

Thursday, July 3, 2003

action=FormSave.asp should be

Thursday, July 3, 2003

For the serverside Check out the code in the FileUpload servlet under Jakarta commons.

Adam Young
Thursday, July 3, 2003

Shiggins - I don't understand the scenario. You want a VB6 app to upload a file over HTTP? Or a web app? Or what?

Duncan Smart
Friday, July 4, 2003

If you want to browse for the file, do something like:

<form method="post" action="" enctype="multipart/form-data">
<input type="file" size="30">
<input type="submit" value="Upload">

Monday, July 7, 2003

*  Recent Topics

*  Fog Creek Home