Bookstore

Recent

Author Topic: fphttpClient - problem in downloading file from dropbox  (Read 1683 times)

dbannon

  • Hero Member
  • *****
  • Posts: 981
    • tomboy-ng, a rewrite of the classic Tomboy
Re: fphttpClient - problem in downloading file from dropbox
« Reply #15 on: August 30, 2019, 12:51:19 am »
OK, there must be varying degrees of this problem then.  Because for me, GetMem's fix solved the "hard ones" even on fpc304.  Maybe kjteng's issue is even harder still ?  Sigh ....

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

GetMem

  • Hero Member
  • *****
  • Posts: 3630
Re: fphttpClient - problem in downloading file from dropbox
« Reply #16 on: August 30, 2019, 07:05:46 am »
@kjteng
I did take another look...Your second link works fine, but you need the openssl libraries. In order for the first link to work, I had to modify fphttpclient.  As far as I can tell, now all three links works fine. Please test attached project.

PS: Don't forget to download the openssl libraries before testing.
32 bit: https://packages.lazarus-ide.org/openssl-1.0.2j-i386-win32.zip
64 bit: https://packages.lazarus-ide.org/openssl-1.0.2j-x64_86-win64.zip
Make sure the dlls are in the same folder as your exe.

kjteng

  • Full Member
  • ***
  • Posts: 184
Re: fphttpClient - problem in downloading file from dropbox
« Reply #17 on: August 31, 2019, 07:42:10 am »
@kjteng
I did take another look...Your second link works fine, but you need the openssl libraries. In order for the first link to work, I had to modify fphttpclient.  As far as I can tell, now all three links works fine. Please test attached project.

PS: Don't forget to download the openssl libraries before testing.
32 bit: https://packages.lazarus-ide.org/openssl-1.0.2j-i386-win32.zip
64 bit: https://packages.lazarus-ide.org/openssl-1.0.2j-x64_86-win64.zip
Make sure the dlls are in the same folder as your exe.
Yes! the modified fphttpClient works perfectly.  It even works for my original code (simply  InitSSLInterface ... httpclient.Get(url, localfile),  without setting SSLType and  httpHeader...).

Thank you very much.
« Last Edit: August 31, 2019, 07:47:19 am by kjteng »