Dim h As HttpJob
h.Initialize("uploadphoto", Me)
Dim fd As MultipartFileData
fd.Initialize
fd.KeyName = "filename" ' NOT "file" !!!!!!
fd.Dir = Folder
fd.FileName = Fname
fd.ContentType = "image/jpeg"
Dim m As Map
m.Initialize
m.Put("login", Main.Login)
m.Put("order", Orders.CurOrderID)
h.PostMultipart(UploadURL, m, Array(fd))
always gets error for the same photo file, and wrong file size: