Merge pull request #409 from arawa/fix/306_invalid_characters_when_saving_file

fix: #306 invalid characters in recording file name
pull/410/head
Sébastien Marinier 2025-12-19 16:22:06 +01:00 committed by GitHub
commit 358efe7da5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,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 filename = `${encodeURIComponent(recording.name + ' ' + startDate.toISOString().replace(/:/g, '-').substr(0,19))}.url`;
const url = OC.linkToRemote(`dav/files/${OC.currentUser}${path}/${filename}`);
await axios.put(url, `[InternetShortcut]\nURL=${recording.url}`);