I have been looking around and found no help with this.
I am using a TFileStream with the indy TIdHTTP for a simple downloader. I have got everything working correctly with one exception. When using the call
IdHTTP.Get(DownloadSource, FileStream);
As soon as it starts downloading TIdHTTP pre-sets the filesize of the downloading file to the full size of the complete file. When the connection is closed gracefully the filesize is set to the correct amount of downloaded data to that point. I can then continue the download at another time. However the problem is if the application crashes or is terminated the file size is left at the incorrectly full size which I cannot detect to continue and restart the download, it now is just a corrupt file.
Any help or suggestions would be greatly appreciated,
Jimmy303
I am using a TFileStream with the indy TIdHTTP for a simple downloader. I have got everything working correctly with one exception. When using the call
IdHTTP.Get(DownloadSource, FileStream);
As soon as it starts downloading TIdHTTP pre-sets the filesize of the downloading file to the full size of the complete file. When the connection is closed gracefully the filesize is set to the correct amount of downloaded data to that point. I can then continue the download at another time. However the problem is if the application crashes or is terminated the file size is left at the incorrectly full size which I cannot detect to continue and restart the download, it now is just a corrupt file.
Any help or suggestions would be greatly appreciated,
Jimmy303