TMSFNCCloudStorageServices1.Storage.OnRequestProgress is not working

I've added this code to the CloudStorageServiceDemo project running on MacOS ARM.

TMSFNCCloudStorageServices1.Storage.OnRequestProgress := HandleProgress;

procedure TForm1.HandleProgress(Sender: TObject;
  const ARequestResult: TTMSFNCCloudBaseRequestResult; AProgress: Single;
  AUpload: Boolean);
  Assert(ARequestResult.Success, 'ARequestResult.Success is FALSE');

  ProgressBar1.value :=Round(AProgress);

Setting a breakpoint inside of HandlProgress() reveals:
HandleProgress() is called at the start of an upload but the AProgress value is already 100.
HandleProgress() is not called during the upload making it impossible to display progress.
HandleProgress() is called at the end of the upload with AProgress = 100.

What am I missing that HandleProgress is not called during the upload with correct values for AProgress?

HandleProgress works correctly for downloads.

Edited to say that I'm using Dropbox and uploading files ranging in size from 19MB to 176MB.


Does the issue also happen when deploying your app on Windows or only on macOS?

It works on Windows 32.

It does not work on Android 32, iOS iPad, MacOS 64, or MacOS 64 ARM.

Can you please verify that the CloudStorageServiceDemo project correctly calls HandleProgress with correct values for AProgress during uploads on those platforms?

TMSFNCCloudStorageServices1.Storage.OnRequestProgress := HandleProgress;

On the other platforms, the OnRequestProgress is triggered with 0 & 100, not with sub-values unfortunately, because we cannot detect progress when uploading. We'll investigate if we can find a workaround solution for this issue.

Thanks, Pieter.

I'm baffled as to how Dropbox knows to not report upload progress when the upload is done by certain platforms. I'll modify my app to only show upload progress if it is on Windows.

It's not a service issue, it's a framework issue. Building the request happens natively (Windows, macOS, iOS, ...) and the implementation sending requests on Windows can track the upload progress.

1 Like

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