fix: 306 invalid characters in recording file name

Signed-off-by: Sebastien Marinier <sebastien.marinier@arawa.fr>
pull/409/head
Sebastien Marinier 2025-12-19 15:44:46 +01:00
parent 289cfe044e
commit fa0967b49e
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ class Api {
public async storeRecording(recording: Recording, path: string) { public async storeRecording(recording: Recording, path: string) {
const startDate = new Date(recording.startTime); const startDate = new Date(recording.startTime);
const filename = `${encodeURIComponent(recording.name + ' ' + startDate.toISOString())}.url`; const filename = `${encodeURIComponent(recording.name + ' ' + startDate.toISOString().replace(/:/g, '-').substr(0,19))}.url`;
const url = OC.linkToRemote(`dav/files/${OC.currentUser}${path}/${filename}`); const url = OC.linkToRemote(`dav/files/${OC.currentUser}${path}/${filename}`);
await axios.put(url, `[InternetShortcut]\nURL=${recording.url}`); await axios.put(url, `[InternetShortcut]\nURL=${recording.url}`);