Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Get DownloadURLs from different Clouds

 Post Reply Post Reply
Author
Schröder Heiko View Drop Down
Member
Member
Avatar

Joined: 30 Nov 2010
Posts: 43
Post Options Post Options   Quote Schröder Heiko Quote  Post ReplyReply Direct Link To This Post Topic: Get DownloadURLs from different Clouds
    Posted: 24 Jul 2019 at 1:49pm
Hello,

I have a small problem and I hope you can help me.
At the moment I test your CloudStorageDemo to get more info.

Thats why on TreeviewChange I let show the download url, because I need this information in my app for later access. With the Dropbox API I know, that DownloadUrl is only a temporarely link, thats why I have to use Share.

  if Assigned(TreeView.Selected) then
  begin
    ci := TTMSFMXCloudItem(TTMSFMXCloudTreeViewItem(TreeView.Selected).DataObject);
    if (ci is TDropboxItem) then
      lblPath.Text := (ci as TDropboxItem).Share;
    if (ci is TGDriveItem) then
      lblPath.Text := (ci as TGDriveItem).???;
    if (ci is TOneDriveItem) then
      lblPath.Text := (ci as TOneDriveItem).???;
  end;

The Google Drive API means the alternateLink property in the File resource is to get a link that can be shared for opening the file. But I can't find this REST API command in your source code.

And what will be the property for OneDrive? The OneDrive API is a little bit confus...

Beste regards
Heiko
Back to Top
Schröder Heiko View Drop Down
Member
Member
Avatar

Joined: 30 Nov 2010
Posts: 43
Post Options Post Options   Quote Schröder Heiko Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jul 2019 at 2:07pm
Okay, I found that for OneDrive I have to use also the Share property but  with TSkyDriveItem, not TOneDriveItem.

if (ci is TSkyDriveItem) then
      lblPath.Text := (ci as TSkyDriveItem).Share;

Now I only need the TGDriveItem property.
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2052
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jul 2019 at 3:18pm
Hi,

Can you please try using the WebContentLink property of the TGDriveItem?
Back to Top
Schröder Heiko View Drop Down
Member
Member
Avatar

Joined: 30 Nov 2010
Posts: 43
Post Options Post Options   Quote Schröder Heiko Quote  Post ReplyReply Direct Link To This Post Posted: 24 Jul 2019 at 3:35pm
Hi Bart, yes, this works! Thanks for your fast response.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down