FNC Cloud get cloud available disk space

Hi to all,
in my project i use TTMSFNCCloudStorageServices in order to upload, download and delete files on cloud. Sometime happend that on cloud there is not available disk space to accept the upload file.
For example, for my dropbox account i have 2TB of total "disk space" and i used 1,9TB if the upload file is 200MB can't be upload.
So, if is possibible, before i send it to dropbox i'll check the avilable space and if is ok .... start the upload.

Thank you for attention



You can use the GetAccountInfo call from the active storage service to retrieve information about available storage space. The info is returned in the OnGetCurrentAccount event. The example below is for DropBox specifically, the way this data is returned is different depending which storage service is used.

procedure TForm1.TMSFNCCloudDropBox1GetCurrentAccount(Sender: TObject;
  const AInfo: TTMSFNCCloudDropBoxInfo;
  const ARequestResult: TTMSFNCCloudBaseRequestResult);
  TTMSFNCUtils.Log('total space: ' + FloatToStr(AInfo.Quota));
  TTMSFNCUtils.Log('used space: ' + FloatToStr(AInfo.QuotaNormal));
  TTMSFNCCloudDropBox(TMSFNCCloudStorageServices1.Storage).OnGetCurrentAccount := TMSFNCCloudDropBox1GetCurrentAccount;

I have had no luck uploading files >150MB to Dropbox using Upload(). This issue is not related to how much disk space is available in the Dropbox account.


The regular Upload to DropBox is limited to 150MB. This is a service limitation. Please use UploadResumableFile instead.
The following blog post explains the usage of resumable uploads: