Google Drive Delphi Component 2.5 Delphi7-10 Full Source
Google Drive Delphi Component 2.5 Delphi7-10 Full Source | 49 kB
Google Drive Delphi Component is a non-visual component that allows to work with Google Drive (including Documents) using Delphi. The component supports Delphi 7 and higher versions and works directly with Google using official API. Official API use guarantees maximum compatibility and fewest possible modifications to future versions.
Features
Create and edit folders
Upload, update and download files in different formats
Move and copy files between folders
Rename and delete files and folders
Export Google documents
Full OAuth 2.0 authentification support (including two-step verification)
Access to XML code for each object with possibility to read and modify any fields for an object
Unicode support for all text fields
HTTPS support
Examples
Browsing Google Drive and adding items to TreeView.
var
FFileInfo: TGDFileInfo;
CurNode: TTreeNode;
Begin
GoogleDrive := TGoogleDrive.Create;
if GoogleDrive.FindFirst(FFileInfo) = 0 then
repeat
CurNode := FilesTV.Items.AddChildObject(FilesTV.Items.GetFirstNode,
FFileInfo.Title, FFileInfo);
if FFileInfo.IsDir then
CurNode.HasChildren := True;
until GoogleDrive.FindNext(FFileInfo) 0;
End;
Uploading "MyDocument.docx" file.
Stream := TFileStream.Create('MyDocument.docx', fmOpenRead);
try
NewFile := GoogleDrive.Upload(Stream, 'MyDocument.docx');
finally
Stream.Free;
end;