Always using webdav

This commit is contained in:
Henrique Dias committed 2016-10-18 16:42:48 +01:00
1 parent 59f5109617
commit 3683c4c06a
5 files changed
+46 -42

No files matched your search

+3 -1
View File
@@ -431,7 +431,9 @@ var newDirEvent = function(event) {
let button = document.getElementById('new');
let html = button.changeToLoading();
let request = new XMLHttpRequest();
request.open("MKCOL", toWebDavURL(window.location.pathname + document.getElementById('newdir').value + "/"));
let name = document.getElementById('newdir').value;
request.open((name.endsWith("/") ? "MKCOL" : "PUT"), toWebDavURL(window.location.pathname + name));
request.setRequestHeader('Token', token);
request.send();
request.onreadystatechange = function() {