I'm trying to upload a file (an image), and some field values to update a profile, all in one POST request. I thought this would work for exactly what I needed: http://natesbox.com/blog/vb-net-post...partform-data/

However from testing out code this is what I've ended up with (which does not work).

Dim mpf As New MultipartForm("http://www.example.com/uploader")
mpf.setField("utf8", "✓")
mpf.setField("section", "profile")
mpf.setField("authenticity_token", token)
mpf.setField("user[displayname]", _Username)
mpf.setField("user[email]", _Email)
mpf.setField("user[timezone]", "America/New_York")
mpf.setField("user[profile_image]", "G:\Real Images\Images from internet\02.jpg")
mpf.sendFile("G:\Real Images\Images from internet\02.jpg")
There is no error that occurs, it just simply does not update the profile. The "user[profile_image]" field is input and type="file" with the name "user[profile_image]". This is the most important aspect because it designates the file. Obviously I can visit the website and upload the image myself, but I'm trying to do this programmatically.

Is there another library or resource I don't know about to achieve this?