Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TMS VCL Cloud Pack
Download files from cloud storage service with ID or DownloadURL only

Different APIs provide different information or use different techniques. For example, unlike the Google Drive API, the OneDrive API does not provide a specific download URL for each file. However only the ID of the file is required to be able download the file, so you can create a dummy CloudItem with only the ID property assigned to be able to use the Download call. In case of Google Drive, you can use the same technique, but assign the DownloadURL property instead of the ID.

Examples:

OneDrive / SkyDrive
var
  i: TSkyDriveItem;
begin
        i := TSkyDriveItem.Create(nil);
        i.ID := ''abc'';
        i.FileName := ''filename.ext'';
        AdvSkyDrive1.Download(i, i.FileName);
        i.Free;

Google Drive
var
  i: TGDriveItem;
begin
        i := TGDriveItem.Create(nil);
        i.DownloadURL := ''abc'';
        i.FileName := ''filename.ext'';
        AdvGDrive1.Download(i, i.FileName);
        i.Free;