How to monitor download progress

This documents how to monitor upload progress for resumable uploads with CloudStorageServices
TMS Software | Blog | Resumable uploads for large files to DropBox, Google Drive and OneDrive in Delphi

How do I monitor download progress with CloudStorageServices?

The documentation (above) does not show how to use the Dropbox specific component for resumable uploads so I'm moving to the CloudStorageServices component. The Dropbox component does not expose the CloudFiles property. (The Dropbox component does monitor download progress though.)

This code compiles:
FCloudFile := TMSFNCCloudStorageServices1.CloudFiles.Add;

This code does not compile:
FCloudFile := TMSFNCCloudDropbox1.CloudFiles.Add;

Hi,

  • Resumable uploads are supported for the TTMSFNCCloudDropBox component. The example code below is working as expected. Which error are you seeing?
var
  FCloudFile: TTMSFNCCloudFile;
  FCloudItem: TTMSFNCCloudDropBoxItem;
begin
  TMSFNCCloudDropBox1.CloudFiles.Clear;
  FCloudFile := TMSFNCCloudDropBox1.CloudFiles.Add;
  FCloudFile.FilePath := 'example.zip';
  FCloudItem := TTMSFNCCloudDropBoxItem.Create(nil);
  FCloudItem.Path := 'UploadFolder';
  TMSFNCCloudDropBox1.UploadResumableFile(FCloudFile, FCloudItem);
  FCloudItem.Free;
end;
  • You can access the specific storage service you are using from the TTMSFNCCloudStorageServices component with the Storage property. This way you can also monitor request progress.

Example
TTMSFNCCloudDropBox(TMSFNCCloudStorageServices1.Storage).OnRequestProgress := TMSFNCCloudDropBox1RequestProgress;

However this is a good suggestion and we'll investigate to expose the OnRequestProgress event on TTMSFNCCloudStorageServices level.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.