'handle the picture from the camera
Dim Fic1 As String = "FicName"
Dim Myout As OutputStream
Myout.InitializeToBytesArray(0)
Myout = File.OpenOutput(File.DirRootExternal, "/" & Fic1 & ".jpg", False)
Myout.WriteBytes(Data, 0, Data.Length)
Myout.Close
Dim hc As OkHttpClient
hc.Initialize("hc")
'Add files
Dim files As List
files.Initialize
Dim fd As FileData
fd.Initialize
fd.Dir = File.DirRootExternal
fd.FileName = Fic1 & ".jpg"
fd.KeyName = "Photo"
fd.ContentType = "application/octet-stream"
files.Add(fd)
'Add name / values pairs (parameters) (empty in my case)
Dim NV As Map
NV.Initialize
Dim req As OkHttpRequest
Dim URL As String = "Your Webservice URL"
req = MultipartPost.CreatePostRequest(URL, NV, files)
req.SetHeader("Authorization",Main.MyToken)
hc.Execute(req, 1)