// connect with the help of developer token
function DropboxConnect() {
dropbox = DropboxV2Api.authenticate({
token: CONSTANTS.get('DBX_ACCESS_TOKEN')
});
}
DropboxConnect.prototype.getPreviewLink = () => {
dropbox({
resource: 'sharing/create_shared_link_with_settings',
parameters: {
path: "/test2/img1.png"
}
}, (err, result, response) => {
if (err) {
console.log(err);
}
console.log('file link folder', result.url);
return result
})
}
connection like this.
but when I am calling preview link it is not waiting for the dropbox call to get finished.
Is this the wrong way to connect?