Closed 1995mars closed 4 years ago
Looks like you use a wrong version of org.apache.commons.codec. Are you using a maven pom file for the dependencies?
With commonds codec 1.11 it should work
thank you! I have successfully tried
When I add a new user, the result is false, is there any way to fix that?
final String baseUrl = "https://tung95.duckdns.org//remote.php/webdav"; NextcloudConnector nextcloudConnector = new NextcloudConnector("tung95.duckdns.org", true, 443, "nc_admin", "nextcloudpassword");
boolean kq = nextcloudConnector.createUser("qmstung","qmstung"); System.out.println(kq);
So you can close the issue, right?
yes. But can you help me on how to add 1 user?
`package com.vnnet.test.console;
import org.aarboard.nextcloud.api.*;
import java.io.IOException;
public class Test { public static void main(String[] args) { final String baseUrl = "https://tung95.duckdns.org//remote.php/webdav"; try { NextcloudConnector nextcloudConnector = new NextcloudConnector("tung95.duckdns.org", true, 443, "nc_admin", "nextcloudpassword"); nextcloudConnector.downloadFile("/Photos/Coast1.jpg","/home/t94hp/Desktop/"); } catch (IOException e) { e.printStackTrace(); } } } `
Process finished with exit code 1