TMSFMXCloudGDrive overwrite file on upload needed


How can i overwrite a file when upload to google drive ?

With TMSFMXCloudDropBox1, TMSFMXCloudSkyDrive1 and TMSFMXCloudYandexDisk1 same file is overwrite on cloud when upload, but with TMSFMXCloudGDrive the file are added!?

Thank you


Pleae note that this is the default behaviour of the Google Drive API.
At this time there is no built-in functionality available in TMSFMXCloudGDrive to autmatically overwrite a file on upload.
However, this is a good suggestion and we'll investigate if this feature can be added in a future version.
But if i delete the target file first, then upload the new one instead, do you consider a functional ideea ?

Something like that:

 //get targetfile.txt id
xGDrive := TGDriveItem.Create(nil);
xGDrive.ItemType := ciFile;
if TMSFMXCloudGDrive1.SearchFile('targetfile.txt', true) then
xGDrive := TGDriveItem(TMSFMXCloudGDrive1.Drive.Items[0]);
 //delete targetfile.txt 

//upload targetfile.txt

That looks like a good workaround.

Just keep in mind that if you are doing a large number of operations this will increase the number of HTTP requests considerably.