fix compile error and webdav

This commit is contained in:
raphael 2021-02-11 14:33:44 +01:00
parent ef8949d2ac
commit 44c8206049
3 changed files with 8 additions and 5 deletions

View File

@ -4,7 +4,7 @@ backend:
accessToken: ""
# Enable the function to save to a webdav-server (check README for more info) -- boolean
enableWebdav: false
enableWebdav: true
# Backend performance tweaks
performance:

View File

@ -19,6 +19,7 @@ import {
faLock,
faLockOpen,
faInfoCircle,
faGlobe,
} from "@fortawesome/free-solid-svg-icons";
import {
faSquare,
@ -52,7 +53,8 @@ library.add(
faPlusSquare,
faLock,
faLockOpen,
faInfoCircle
faInfoCircle,
faGlobe
);
dom.i2svg();

View File

@ -4,7 +4,7 @@ import whiteboard from "./whiteboard";
import keybinds from "./keybinds";
import Picker from "vanilla-picker";
import { dom } from "@fortawesome/fontawesome-svg-core";
import pdfjsLib from "pdfjs-dist/webpack";
import pdfjsLib from "pdfjs-dist";
import shortcutFunctions from "./shortcutFunctions";
import ReadOnlyService from "./services/ReadOnlyService";
import InfoService from "./services/InfoService";
@ -815,7 +815,7 @@ function initWhiteboard() {
var date = +new Date();
$.ajax({
type: "POST",
url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "api/upload",
url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "/api/upload",
data: {
imagedata: base64data,
whiteboardId: whiteboardId,
@ -827,10 +827,11 @@ function initWhiteboard() {
showBasicAlert("Whiteboard was saved to Webdav!", {
headercolor: "#5c9e5c",
});
console.log("Image uploaded for webdav!");
console.log("Image uploaded to webdav!");
callback();
},
error: function (err) {
console.error(err);
if (err.status == 403) {
showBasicAlert(
"Could not connect to Webdav folder! Please check the credentials and paths and try again!"