Jump to content

Integrating DropBox + Unigui


mmurgas

Recommended Posts

Hello Friends, I consult them if someone made ​​connection from Unigui and Dropbox, the idea is to have an evidence base (.PDF) in the cloud, but manage user profiles and upload information from Delphi + Unigui.
 
If someone can guide me, Many Thanks
 
Greetings

 

MMurgas

Link to comment
Share on other sites

the closest I know of is the use of TMS API package:

http://www.tmssoftware.com/site/cloudpack.asp

The same has components integration with DropBox:

* TAdvDropBoxDataStore: component DataStore API to access DropBox
* Component to get access to DropBox storage
* Component to get access to DropBox DataStore API

TAdvDropBox

     Create folders
     Delete files
     upload files
     download files
     Get file properties

TAdvDropBoxDataStore

     Create, delete DataStores
     Read, update, insert, delete records DataStore

Link to comment
Share on other sites


procedure TDropbox.Upload(const AFileName: String);
const
API_URL = 'https://api-content.dropbox.com/1/files_put/sandbox/';
var
URL: String;
https: TIdHTTP;
SslIoHandler: TIdSSLIOHandlerSocket;
begin
URL := API_URL+ExtractFileName(AFileName)
+ '?oauth_signature_method=PLAINTEXT&oauth_consumer_key=' + FAppKey
+ '&oauth_token=' + FOAuth.AccessToken
+ '&oauth_signature=' + FAppSecret + '%26' + FOAuth.AccessTokenSecret;

https := TIdHTTP.Create(nil);
try
SslIoHandler := TIdSSLIOHandlerSocket.Create(https);
SslIoHandler.SSLOptions.Method := sslvTLSv1;
SslIoHandler.SSLOptions.Mode := sslmUnassigned;

https.IOHandler := SslIoHandler;
https.Post(URL, AFileName);
finally
FreeAndNil(https);
end;
end;
  • Like 1
  • Upvote 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...