*/
private void uploadFile(DbxClient client, String dropboxPath, boolean overwrite) throws DbxException, IOException {
File file = new File(contentDir + File.separator + dropboxPath);
FileInputStream inputStream = new FileInputStream(file);
try {
DbxWriteMode mode = overwrite ? DbxWriteMode.force() : DbxWriteMode.add();
DbxEntry.File uploadedFile =
client.uploadFile(dropboxPath, mode, file.length(), inputStream);
logger.debug("successfully uploaded file '{}'. New revision is '{}'", uploadedFile.toString(), uploadedFile.rev);
} finally {
inputStream.close();