-
1
- #1
greatrohit
Programmer
I am building a client application in vb. This application is for uploading a file to a web server. The server has a CGI application which uploads the file from the client. The vb application on the client(which i am suppose to make) communicates with the CGI application on server through http, providing it the path of the file(on the client) to be uploaded. Along with file path it also has to send the comment given by user which is also processed by the CGI application. <br>
I am using internet transfer control in my application. I am using "execute" command and in it i am using "post" method.<br>
codes are as follows<br>
<br>
strurl="http:// url / directory /upldfl.cgi"<br>
strformdata = "upfile = c:\dir1\testfile5 note=xyz"<br>
Inet1.Execute strurl, "POST", strformdata, "Content-Type : multipart/form-data enctype : multipart/form-data"<br>
<br>
Error from the server is "Boundary not provided: probably a bug in your server at ./cgi-lib.pl line 417." But this client application has already been made in HTML and is properly communicating with the cgi application at<br>
server end. Thus i dont think there is any problem with cgi script. You can see this application in HTML by going to <br>
<br>
<br>
I have doubts whether<br>
1. strformdata = "upfile = c:\dir1\testfile5 note=xyz" is correct. Do we specify multiple parameters(upfile,note) by puting a space in between.<br>
<br>
2. Inet1.Execute strurl, "POST", strformdata, "Content-Type :multipart/form-data enctype : multipart/form-data" & vbcrlf<br>
Are different parameters(content-type,enctype) in header field seperated by a space.<br>
<br>
3. Is the content-type used correct.<br>
<br>
I also tried the following code using "&" between parameters <br>
strurl="strformdata="upfile=c:\trainees\testfile5¬e=xyz"<br>
Inet1.Execute strurl, "post", strformdata<br>
<br>
but it gives error "content-type not specified"<br>
On giving content-type:<br>
<br>
Inet1.Execute strurl, "Post", strformdata, "content-type:multipart/form-data"<br>
<br>
It gives error:<br>
"Boundary not provided: probably a bug in your server"<br>
<br>
<br>
I tried very hard to find some material and examples on it but could not. The examples provided dont pass multiple parameter and no example for file uploading is provided using internet control tool and http.<br>
<br>
Please help me and if possible inform me where i can get this information.<br>
<br>
<br>
<br>
I am using internet transfer control in my application. I am using "execute" command and in it i am using "post" method.<br>
codes are as follows<br>
<br>
strurl="http:// url / directory /upldfl.cgi"<br>
strformdata = "upfile = c:\dir1\testfile5 note=xyz"<br>
Inet1.Execute strurl, "POST", strformdata, "Content-Type : multipart/form-data enctype : multipart/form-data"<br>
<br>
Error from the server is "Boundary not provided: probably a bug in your server at ./cgi-lib.pl line 417." But this client application has already been made in HTML and is properly communicating with the cgi application at<br>
server end. Thus i dont think there is any problem with cgi script. You can see this application in HTML by going to <br>
<br>
<br>
I have doubts whether<br>
1. strformdata = "upfile = c:\dir1\testfile5 note=xyz" is correct. Do we specify multiple parameters(upfile,note) by puting a space in between.<br>
<br>
2. Inet1.Execute strurl, "POST", strformdata, "Content-Type :multipart/form-data enctype : multipart/form-data" & vbcrlf<br>
Are different parameters(content-type,enctype) in header field seperated by a space.<br>
<br>
3. Is the content-type used correct.<br>
<br>
I also tried the following code using "&" between parameters <br>
strurl="strformdata="upfile=c:\trainees\testfile5¬e=xyz"<br>
Inet1.Execute strurl, "post", strformdata<br>
<br>
but it gives error "content-type not specified"<br>
On giving content-type:<br>
<br>
Inet1.Execute strurl, "Post", strformdata, "content-type:multipart/form-data"<br>
<br>
It gives error:<br>
"Boundary not provided: probably a bug in your server"<br>
<br>
<br>
I tried very hard to find some material and examples on it but could not. The examples provided dont pass multiple parameter and no example for file uploading is provided using internet control tool and http.<br>
<br>
Please help me and if possible inform me where i can get this information.<br>
<br>
<br>
<br>