Hi,
I can upload my files with:
public void uploadFileToDropbox(File inputFile, String path, String fileName) throws Exception{
InputStream inputStream = new FileInputStream(inputFile);
try {
FileMetadata uploadedFile = client.files().uploadBuilder("/"+path+"/"+fileName).uploadAndFinish(inputStream);
System.out.println("Uploaded to Dropbox: " + uploadedFile.getName());
} finally {
inputStream.close();
}
}How can I get the URL of the folder? I tried this:
public String getShareLink(String path) throws DbxException{
SharedLinkMetadata slm = client.sharing().createSharedLinkWithSettings(path);
return(slm.getUrl());
}But I always get:
java.lang.IllegalArgumentException: String 'path' does not match pattern