ssl - how to download/uplaod file over HTTPS using Indy 10 and OpenSSL in delphi? -


i wish download file using indy. problem connecting ssl. please me using https or sftp.

procedure tform1.bitbtn1click(sender: tobject); begin   idftp1.iohandler := tidssliohandlersocketopenssl.create(idftp1);   idftp1.usetls:=utuserequiretls;   idftp1.dataportprotection:=ftpdpsprivate;   idftp1.host := '127.0.0.1';   idftp1.username := 'ftp';   idftp1.password := '123';   idftp1.port:=21;   idssliohandlersocketopenssl1.startssl;   try     idftp1.connect;     idftp1.disconnect;       idftp1.free;   end; end; 

you correctly (except fact free component don't create in same code). same https.

idhttp1.iohandler := tidssliohandlersocketopenssl.create(); idhttp1.get('https://...'); 

just note need openssl libraries https://indy.fulgan.com/zip/ssl.zip or version want https://indy.fulgan.com/ssl/

also there difference between sftp , ftps. indy's idftp supports ssl (ftps). can't work sftp (ftp using ssh). if want use sftp, have use alternative commercial component https://www.eldos.com/sbb/delphi-sftp.php

you should specify error if shows one. ssl libraries missing. if don't know how download/upload file, there methods that

idftp1.put (upload) idftp1.get (download)  idhttp1.put/post (upload) idhttp1.get (download) 

you need tidmultipartformdatastream unit "idmultipartformdata" http post upload files


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -