Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Dropbox API get public share link after uploading file

The following uploads my file to the specified path in dropbox:

DbxEntry.File uploadedFile = client.uploadFile("/" + id + "/name" + ".png",
DbxWriteMode.add(), tile.length(), inputStream);
System.out.println("Uploaded: " + uploadedFile.toString());

However how can i retrieve the Public Share URL after it is uploaded? I can't find any documentation.

like image 951
ThatGuy343 Avatar asked Feb 12 '23 07:02

ThatGuy343


1 Answers

Found the right API method:

DbxClient = new DbxClient(config, accessToken);
client.createShareableUrl(path)

Couldn't get any easier...

like image 102
ThatGuy343 Avatar answered Feb 15 '23 11:02

ThatGuy343