Registriert seit: 10. Apr 2006
Ort: Leverkusen
969 Beiträge
Delphi 6 Professional
|
AW: Per indy mehre Datein als Multipart über https versenden.
14. Feb 2018, 12:47
Hmm..
So nach diesem Muster?
Delphi-Quellcode:
var
IdHTTP: TIdHTTP;
PostData: TIdMultipartFormDataStream;
begin
AUrl := EncodeURLA(AUrl);
IdHTTP := TIdHTTP.Create(nil);
try
PostData := TIdMultipartFormDataStream.Create;
try
PostData.AddFile('Test_File',AFileName);
PostData.AddFormField('Text_in_UTF8', Utf8Encode(AData),'utf-8').ContentTransfer := 'binary';
PostData.AddFormField('Text_in_ASCII', AData, 'ISO-8859-1').ContentTransfer := 'binary';
result := IdHTTP.Post(AURL,PostData);
finally
PostData.Free;
end;
finally
IdHTTP.Free;
end;
end;
|
|
Zitat
|