Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. сервер:
  2. savestr := TMemoryStream.Create;
  3. ARequestInfo.PostStream.Position:=0;
  4. savestr.LoadFromStream(ARequestInfo.PostStream);
  5. savestr.SaveToFile(path + ARequestInfo.Params.ValueFromIndex[0]+'.jpg');
  6. AResponseInfo.ContentText:='ok';
  7. Memo1.Lines.Add('save '+path + ARequestInfo.Params.ValueFromIndex[0]);
  8.  
  9. клиент отправляет фото из imagecontrol
  10. mem := TMemoryStream.Create;
  11. nameimg := 'sklad_' + datetostr(now) + '_' + random(9999)
  12. .tostring;
  13. ImageControl1.Bitmap.SaveToStream(mem);
  14. mem.Position:=0;
  15. NetHTTPClient1.Post(url + nameimg, mem);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement