TAdvGDrive and GetFileInfo

Hi,


I want to upload a local file to Google Drive, but If the filename exists it should be updated not created a second time. The CloudStorageDemo shows only the upload but not the update!

Thats why I want to use the function TAdvGDrive.SearchFile to look for a duplicate.
If the file exists I want to get the TGDriveItem to update the file with TAdvGDrive.GetFileInfo.

What is the FileID of method TAdvGDrive.GetFileInfo? Where can I find the FileID of the existing file?

Best regrads
Heiko 


To update a file, you'd use the TAdvGDrive.Update() function.
Its parameter is a TCloudFile object reference to the file you want to update. This object is the object returned by GetFileInfo().

Hello,


yes, I know the TAdvGDrive.Update() function.

> This object is the object returned by GetFileInfo().

But what is the parameter FileID in GetFileInfo()?


It is the unique Google ID of the file. 
If you do not have it, use SearchFile() to retrieve matching results and from there you can get this file ID.

In my opinion the result of TAdvGDrive.SearchFile is Boolean...

Yes, but it fills result found files in AdvGDrive.GDrive collection, so when true, there should at least be one file in AdvGDrive.GDrive

Hi, 


but then I don't need GetFileInfo(FileID), because I get the TCloudItem directly from AdvGDrive.Drive.Items....

What is the difference to GetFileInfo()?

GetFileInfo gives you direct access to the TCloudItem object if you already saved the file ID (for example in a previous session)