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??
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 !!