File download issue in TIdHttp using Delphi

时间:2016-02-03 03:04:09

标签: delphi indy10 delphi-10-seattle

I'm using Delphi 10 Seattle for developing android mobile application and desktop application. And as per the requirement i need to download the Mp3 file (may be 1 to 5 MB) and need to save the file in the mobile app which is created using Delphi. And by using IIS, I made the path in public and the file can be accessed any where. And the server system has upload speed as 512 Kbps and Download speed as 1Mbps.
And now I'm trying to download the file file from server to mobile using TIdHttp.

If I'm using my mobile app in the Wifi (Download Speed: 8 Mbps, Upload Speed: 2 Mbps), the file is getting downloaded properly.

But When I'm downloading the file using Mobile data (3g, Download Speed: 4 Mbps, Upload Speed: 260 Kbps), the file is not getting downloaded properly and it is showing the exception as 'Read Timeout'. Also I have increased the ReadTimeout to 9999999. Then, also file is not getting downloaded. Also when I have tried to open the link in Google chrome. Then, also file is not playing.

Should I need to increase the Upload speed speed of the system or by changing the code, I can download properly.

Thanks in advance.

2 个答案:

答案 0 :(得分:0)

  1. THTTPClient尝试现代组件System.Net.HttpClient
  2. 您可以通过网络浏览器下载文件吗?只是为了确保,IIS配置正确。

答案 1 :(得分:0)

重启服务器系统后,我也可以使用慢速互联网下载文件。感谢每一位人士的建议。