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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Wininet API with vb to perform a "POST" operation

Status
Not open for further replies.

greatrohit

Programmer
Aug 24, 1999
14
0
0
CN
I am trying to upload a file to a web server .Web server has a perl code for uploading the files.I am using "POST" method to send the path of file and other information to the perl code at web server.I tried using Internet transfer controls in vb to perform this function but did not succeed.Now i am trying to use Wininet API to perform this function. The material and examples that i found were using Wininet with C++ and not VB.<br>
As i am facing some problem using it with vb,can someone tell me from where can i get information for using wininet in vb<br>
Thanks<br>

 
Easiest way to upload files to a webserver... check out and look at his EZSiteUpload component, it's an ActiveX component (.dll) you can use in your web project. And, he includes the source code so you can modify it if you need to. BTW - if you don't like his, you can find several others on the web if you poke around some of the popular ASP sites (15seconds.com, activeserverpages.com, asptoday.com, 4guysfromrolla.com, and others).<br>
<br>
That's for starters... however, the key to uploading a file to the server is three fold:<br>
1. Make sure you are using the proper form element<br>
&lt;input type=file&gt;<br>
2. Make sure you are using the proper form tags:<br>
&lt;form enctype="multipart/form-data" method="post"&gt;<br>
3. Make sure you have something on the server that can parse the binary data from the form and store it on the server's hard drive. That's where an ActiveX dll like the one I referenced above comes into play or maybe that's what your PERL script does.<br>
<br>
Anyway, this doesn't answer your question directly but I hope it helps you meet your goals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top