Send file (POST method) to a https web server lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cpalx · 2018-03-01 02:40 I need to send a file to a Secure Web server (https) using POST method i found a code to send with synapse but it doesnt work with https. Any Idea? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  function TForm1.MyHttpPostFile(const URL, FieldName, FileName: string;  const Data: TStream; const ResultData: TStrings): Boolean;var  HTTP: THTTPSend;  Bound, s: string;begin  Bound := IntToHex(Random(MaxInt), 8) + '_Synapse_boundary';  HTTP := THTTPSend.Create;  try    s := '--' + Bound + CRLF;    s := s + ' content-disposition: form-data; name="' + FieldName + '";';    s := s + ' filename="' + FileName +'"' + CRLF;    s := s + ' Authorization: ' + ediTOKEN.Text+ CRLF;    s := s + ' Content-Type: Application/octet-string' + CRLF + CRLF;    WriteStrToStream(HTTP.Document, s);    HTTP.Document.CopyFrom(Data, 0);    s := CRLF + '--' + Bound + '--' + CRLF;    WriteStrToStream(HTTP.Document, s);    HTTP.MimeType := 'multipart/form-data; boundary=' + Bound;    Result := HTTP.HTTPMethod('POST', URL);    if Result then      ResultData.LoadFromStream(HTTP.Document)    else      ResultData.Text:= 'Error Code:' + IntToStr(HTTP.ResultCode);  finally    HTTP.Free;  end;end; ---------------------------------------------------------------------- Renat.Su · 2018-03-01 08:42 Other methods work? GET, for example. If not, then surely something is not so configured with OpenSSL. Do you have any libraries folder? If there is, try deleting. If not, add it to the folder. ) Do not forget to add ssl_openssl to the Uses block ---------------------------------------------------------------------- cpalx · 2018-03-01 22:20 My fault, i didnt: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   HTTP.Sock.CreateWithSSL( TSSLOpenSSL );