TTMSFNCCloudStorageServices and disconnect

Good afternoon to all,
i readed (Disconnecting TCloudStorage) that there is no way to abort a file action, in my case upload.
The only, not elegant, way is to force a disconnection to service (in my case dropbox).
There's a way to do a "brutal" disconnection in order to stop the current process??

Tank's for all
Daniele

Hi,

You can cancel running requests, or any other request you have access to:

uses
  FMX.TMSFNCCloudBase;

procedure TForm1.CancelRunningRequests;
var
  I: Integer;
  r: TTMSFNCCloudBaseRequest;
  rr: TTMSFNCCloudBaseRequestResult;
begin
  for I := 0 to TMSFNCCloudStorageServices1.Storage.RunningRequests.Count - 1 do
  begin
    r := TMSFNCCloudStorageServices1.Storage.RunningRequests[I];
    if r is TTMSFNCCloudBaseRequestResult then
    begin
      rr := (r as TTMSFNCCloudBaseRequestResult);
      rr.Cancel;
    end;
  end;
end;

Hi Pieter,
thank's for reply .... but i have bad news ...
Even with your code ... the connection does not drop ... and the upload continue.

I tried with TTMSFNCCloudStorageServices.Storage.Disconnect whrere, if i understand rigth, the "storage" is disconnect (but with no result).
I think that must be one way to "kill" the upload ..... even a "dirty" one !!

Thank's for your attention

Daniele

Hi,

I noticed a shortcoming in the upload progress and fixed this on our side in TMS FNC Core.

Thank's Pieter,
it will be ready in next update ?

Daniele

Next update will have this included (TMS FNC Core). Please contact us if you want an incremental source update via email.

Hi Pieter,
last one i have, via TMS subscription manager, is on 13/04/2022.
I can wait without problem next one.

Thank's again
Daniele

1 Like