fix: remote link generation

fix #102
pull/105/head
sualko 2020-11-19 16:21:55 +01:00
parent 40a79d9128
commit b8b2e98869
1 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ class Api {
public async storeRecording(recording: Recording, path: string) {
const startDate = new Date(recording.startTime);
const filename = `${encodeURIComponent(recording.name + ' ' + startDate.toISOString())}.url`;
const url = `/remote.php/dav/files/${OC.currentUser}${path}/${filename}`;
const url = OC.linkToRemote(`dav/files/${OC.currentUser}${path}/${filename}`);
await axios.put(url, `[InternetShortcut]\nURL=${recording.url}`);
@ -185,7 +185,7 @@ class Api {
public async storeRoom(room: Room, path: string) {
const filename = `${encodeURIComponent(room.name)}.url`;
const url = `/remote.php/dav/files/${OC.currentUser}${path}/${filename}`;
const url = OC.linkToRemote(`dav/files/${OC.currentUser}${path}/${filename}`);
await axios.put(url, `[InternetShortcut]\nURL=${this.getRoomUrl(room)}`);