OneDrive Delphi Component
OneDrive Delphi component is a non-visual component that allows you to access content stored in OneDrive (including OneDrive for Business) and SharePoint (drives of the SharePoint sites) using Delphi. The component works through Microsoft Graph, a common API for Microsoft services.
Features
- Get account info including total and remaining storage quota
- Get file and folder info including size and last modified timestamp
- Create and edit folders
- Upload, update and download files
- Copy and move files between folders
- Rename and delete files
- Share files and folders
- Search for files and folders
- Support for partial range downloads
- Optional speed limitation for uploads and downloads
- Proxy servers support
Examples
Connecting to OneDrive and showing list of folders and files in TreeView.
procedure Browse(Parent: TTreeNode = nil); var FFileInfo: TODFileInfo; CurNode: TTreeNode; ParentID: String; begin if Parent = nil then ParentID := '' else ParentID := TODFileInfo(Parent.Data).ID; if OneDrive.FindFirst(FFileInfo, ParentID) = 0 then repeat if Parent = nil then CurNode := TreeView.Items.AddChildObject(TreeView.Items.GetFirstNode, FFileInfo.Title, FFileInfo) else CurNode := TreeView.Items.AddChildObject(Parent, FFileInfo.Title, FFileInfo); if FFileInfo.IsDir then Browse(CurNode); until OneDrive.FindNext(FFileInfo) <> 0; end;
Uploading "MyDocument.docx" file.
Stream := TFileStream.Create('MyDocument.docx', fmOpenRead); try OneDrive.Upload(Stream, 'MyDocument.docx', ParentID); finally Stream.Free; end;
Deleting file with FileInfo.
Var FileInfo: TSDFileInfo; begin FileInfo := ...; SkyDrive.Delete(FileInfo);
Compiled Demo Screenshots
Click on the screenshot to view a larger image.
Single developer license
For 1 developer
Buy Now!
With source code
Free updates for one year
Priority lifetime support
Free updates for one year
Priority lifetime support
Site license
For unlimited developers in the company
Buy Now!
With source code
Free updates for one year
Priority lifetime support
Free updates for one year
Priority lifetime support
All Cloud Components in Bundle
With source code
Free updates for one year
Priority lifetime support
Free updates for one year
Priority lifetime support