String oc_version = am.getUserData(account, AccountAuthenticator.KEY_OC_VERSION);
OwnCloudVersion ocv = new OwnCloudVersion(oc_version);
String webdav_path = AccountUtils.getWebdavPath(ocv);
- WebdavClient wdc = new WebdavClient(Uri.parse(oc_base_url + webdav_path));
+ WebdavClient wdc = new WebdavClient(account, getApplicationContext());
wdc.allowSelfsignedCertificates();
wdc.setCredentials(username, password);
try {
status = wdc.executeMethod(mkcol);
Log.e(TAG, "mkcol returned " + status);
- wdc.putFile(filepath, INSTANT_UPLOAD_DIR + "/" + Uri.encode(filename), mimetype);
+ wdc.putFile(filepath, INSTANT_UPLOAD_DIR + "/" + filename, mimetype);
} catch (HttpException e) {
e.printStackTrace();
} catch (IOException e) {