Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upload via HTTP Post

Status
Not open for further replies.

xollox

Technical User
Jun 28, 2002
18
US
I'm trying to automate what this HTML page does manually (upload a file and pass a few fields of info):

<FORM METHOD=&quot;Post&quot; enctype=&quot;multipart/form-data&quot; Action=&quot;whatever.asp&quot;>
Username<INPUT TYPE=&quot;Hidden&quot; Name=&quot;username&quot; size=&quot;20&quot;><br>
Password<INPUT TYPE=&quot;Hidden&quot; Name=&quot;password&quot; size=&quot;20&quot;><br>
File to upload<INPUT TYPE=&quot;file&quot; Name=&quot;data&quot; size=&quot;20&quot;><br>
Client type<INPUT TYPE=&quot;Hidden&quot; Name=&quot;client&quot; size=&quot;20&quot;><br>
<input type=&quot;submit&quot; value=&quot;Submit&quot;>
</form>

Is there any way to do this with ASP? Scripting? MS Access?

Thanks in advanced for any help you can provide.


-XolloX
 
When you use enctype=&quot;multipart/form-data&quot; you're not going to be able to do anything with those hidden fields on &quot;Whatever.asp&quot;. Are you using a component to perform the upload?
 
The hidden fields are really not that important. The file part is the part that i can't figure out.

-XolloX
 
I'm guessing that you can't automate it. Even if you knew the path to the file ahead of time, you can't stuff a value into a <INPUT TYPE=&quot;FILE&quot;> control. Don't give up hope. Someone here may have a solution.
 
I understand the reason behind not being able to put a file name into an HTML file, but a server side file should be able to do that. Are all uploads done manually? ..that seems a bit ridiculous.

-XolloX
 
Are you trying to have a script upload a file from one server to another or are you trying to have a webpage download something from a client machine?

Server to Server should not be a problem. Client to Server would be restricted due to security issues (I know, I know, we all want to be able to download our ex's personal data, but that wouldn't be nice).



_______________________________________
Ignorance is a beautiful thing:
You don't know what you can't do...
 
I'm trying to upload a file from a winXP pro machine (we can enable IIS without a problem) to a server. So, to answer the question, server to server, yes.

-XolloX
 
It's a B2B project, so I don't choose how they receive the files. It needs to be a HTTP post.

-XolloX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top