Dowload file from a folder ?

Hi,

How can i download a file localized in a folder (with no selection on Treeview) with TMSFMXCloudGDrive1 and TMSFMXCloudSkyDrive1 ?

For TMSFMXCloudDropBox1 and TMSFMXCloudYandexDisk1 i use this code and work ok,
 // DropBox - download from specific folder - work OK!
            if xCloud.ClassNameIs('TTMSFMXCloudDropBox') then
            begin
              xDrop := TDropBoxItem.Create(nil);
              xDrop.ItemType := ciFile;
              xDrop.Path := xFolder + '/' + xFileName;
              //
              xCloud.Download(xDrop, xTargetFile);
            end;



Thank you !

Hi,


Please note that GDrive requires a DownloadURL and SkyDrive an ID instead of a Path to be able to download a file.
You should be able to use the Search function to retrieve the required information for files similar as with retrieving a specific folder.
Hi Bart,

Sorry again, but can you help me with my code please ?
None of then are work properly 

          // GDrive
            if xCloud.ClassNameIs('TTMSFMXCloudGDrive') then
            begin
              xGDrive := TGDriveItem.Create(nil);
                 if TMSFMXCloudGDrive1.SearchFile(xCloudFolder + '/' + xCloudFile, true) then
                xGDrive := TGDriveItem(TMSFMXCloudGDrive1.Drive.Items[0]);
              //
              TMSFMXCloudGDrive1.Download(xGDrive,  xTargetFile);
            end;

            // SkyDrive
            if xCloud.ClassNameIs('TTMSFMXCloudSkyDrive') then
            begin
              // FOLDER
              xSkyFolder := TSkyDriveItem.Create(nil);
              TMSFMXCloudSkyDrive1.SearchList(xCloudFolder, true, nil);
              xSkyFolder := TSkyDriveItem(TMSFMXCloudSkyDrive1.Drive.Items[0]);

              // FILE
              xSkyFile := TSkyDriveItem.Create(nil);
              TMSFMXCloudSkyDrive1.SearchList(xCloudFile, true, xSkyFolder);
              xSkyFile := TSkyDriveItem(TMSFMXCloudSkyDrive1.Drive.Items[0]);
              //
              TMSFMXCloudSkyDrive1.Download(xSkyFile, xTargetFile);
            end;

- GDrive: There is no folder path required in the SearchFile function.

- SkyDrive: You can use the result of the SearchList call instead of the Drive collection. 

Example:
var
  xSky: TSkyDriveItem;
  SkyItems: TCloudItems;
begin
  xSky := TSkyDriveItem.Create(nil);
  SkyItems := AdvSkyDrive1.SearchList(Edit1.Text, True, nil);
  xSky := TSkyDriveItem(SkyItems.Items[0]);

Note if the problem persists you can check in your code if the search function has returned the result(s) you expected to find out if the search query was correct.

Have you samples to download and upload specific file (folder + filename without treeview) with Dropbox, OneDrive and Google Drive ?

Nope, i can not manage to do this with no involving treeview :(



I regret the purchase of these components, they are unusable without adequate documentation. I will look for another provider who will bring more help