When downloading 2 times the AProgress in TMSFNCCloudDropBoxRequestProgress is not resetting.
Is there a workaround?
When downloading 2 times the AProgress in TMSFNCCloudDropBoxRequestProgress is not resetting.
Is there a workaround?
Hi,
We have not been able to reproduce this issue.
Can you please provide more details so we can further investigate this?
Hi Bart,
in my code I run
TMSFNCCloudDropBox.GetFolderList;
which ends in:
TMSFNCCloudDropBoxGetFolderListComplete
Now the event
TMSFNCCloudDropBoxRequestProgress
is called for the first time and counta AProgress to 100.
Later I run
TMSFNCCloudDropBox.Download
with the event
TMSFNCCloudDropBoxDownloadFile
This event uses also
TMSFNCCloudDropBoxRequestProgress
Noe the AProgress counter start at 100 - no chance to control a progressbar.
It seems that TMSFNCCloudDropBox.GetFolderList and TMSFNCCloudDropBox.Download share the same event...
The OnRequestProgress fires for every request, you can track for file download only by checking the ARequestResult.Name.
procedure TForm1.TMSFNCCloudDropBox1RequestProgress(Sender: TObject;
const ARequestResult: TTMSFNCCloudBaseRequestResult; AProgress: Single;
AUpload: Boolean);
var
p: Single;
begin
if AUpload or (ARequestResult.Name <> 'DOWNLOAD FILE') then
Exit;
p := AProgress;
TThread.Queue(nil,
procedure
begin
ProgressBar1.Value := p;
Label1.Text := Format('Downloading: %.0f%%', [p]);
end);
end;
Works fine - thanks ...