Dim Myout As OutputStream
Myout.InitializeToBytesArray(0)
Myout = File.OpenOutput(File.DirInternal, "/1.jpg", False)
Myout.WriteBytes(Data, 0, Data.Length)
Myout.Close
Dim out As OutputStream
out.InitializeToBytesArray(0)
Dim In As InputStream = File.OpenInput(File.DirInternal, "/1.jpg")
File.Copy2(In, out)
Dim Input As Map
Input.Initialize
Input.Put("IdRma",OnSiteMain.IdRMA)
Input.Put("Fic",out.ToBytesArray)
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(Input)
Log(JSONGenerator.ToPrettyString(2))
Dim Job1 As HttpJob
Job1.Initialize("Photo", "Photo")
Job1.PostString(Main.URL & "tools/file/", JSONGenerator.ToPrettyString(2))
Job1.GetRequest.SetHeader("Authorization",Main.MyToken)
Job1.GetRequest.SetContentType("application/json")
Job1.GetRequest.Timeout = 60000