New Sync using dropbox

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
RERII
Posts: 56
Joined: March 4th, 2015, 11:34 am

New Sync using dropbox

Post by RERII »

I know you can copy this example below. The words in red are my questions.

// connect to Dropbox
if syncconnect(Dropbox) then

// get the latest versions of the application files from Dropbox
syncfile(GET,"/MyApp/MyApp.pff");
The "GET" means to get the this file from the server in a folder call my app?
syncfile(GET,"/MyApp/MyApp.pen");

// send the latest cases to Dropbox
syncdata(PUT,SURVEY_DICT);

syncdisconnect();

endif;
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: New Sync using dropbox

Post by josh »

I can't see the red so I'm assuming your question is: The "GET" means to get the this file from the server in a folder call my app?

The answer is that this will get the file MyApp.pff from the remote folder Dropbox/MyApp and save it locally in the same folder as the app you are currently running. If you want to store to a different location on the local device then you can use the optional second parameter:

syncfile(GET,"/MyApp/MyApp.pff", "MyLocalFolder/MyApp.pff")

This will download from the folder Dropbox/MyApp and save to MyLocalFolder. Note that MyLocalFolder is relative to the current application directory so if you are running an application from the folder CSEntry/MyMenu then the file will be downloaded to CSEntry/MyMenu/MyLocalFolder.
Post Reply