Skip to content

Commit

Permalink
fix: remote link generation
Browse files Browse the repository at this point in the history
fix #102
  • Loading branch information
sualko committed Nov 19, 2020
1 parent 40a79d9 commit b8b2e98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts/Common/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);

Expand All @@ -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)}`);

Expand Down

0 comments on commit b8b2e98

Please sign in to comment.