HttpWebrequest and uploading an image as multipart

yasirmahmood

New member
Joined
Jun 11, 2009
Messages
1
Programming Experience
Beginner
Hi
I have got a standard Httpwebrequest working and its all fine, here is what i have so far:

lRep = "http://192.192.192.1:8080/Test_0_11/Tasks?param1=json
WebReq = WebReq.Create(lREp)
WebReq.Timeout = 600000
WebReq.AllowWriteStreamBuffering = True
WebReq.Method = "GET"
WebResp = WebReq.GetResponse()
WebStream = WebResp.GetResponseStream
StreamR = New StreamReader(WebStream)
XCCC = StreamR.ReadToEnd
StreamR.Close()
WebStream.Close()
WebResp.Close()
WebReq.Abort()


Problem is that I want to upload an image through this httpwebrequest, i am told that when calling AddImage request inorder to send an image to the server, the request should be Multipart/form-data, what does that mean?.
The name of the parameter is called PhotoTK, so i presume the url may look something like this:
lRep = "http://192.192.192.1:8080/Test_0_11/AddImage?PhotoTK=<image>

but what do i put into <image>?
How do i get an image and put it into a string?

Sorry to sound dufuss, but not done anything like this before, so any help would be appreciated.
 
Back
Top