Dim j As HttpJob
j.Initialize("", Me)
Dim m As Map = CreateMap("additionalfield":"additional data")
Dim filelist As List ' List holding all files to Upload
filelist.Initialize
Dim fd As MultipartFileData ' Create a MultipartFileData for each file to upload
fd.Initialize
fd.Dir = File.DirAssets
fd.FileName = "testfiletoupload.txt"
fd.ContentType = "Text/Plain"
fd.KeyName = "Testfile"
filelist.Add(fd) ' and add the MultipartFileData to the list
j.PostMultipart("http://domain.com/uploadendpoint.php",m,filelist) ' Upload the files and also giving the additional Values (m Map) to the uploadendpoint
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
j.Release