fix(downloading): fix downloading songs from browser with special characters

fix downloading songs that contains special characters in name (cyrillic, local dialect...)

fix #41
This commit is contained in:
Raiper34
2026-02-07 13:44:39 +00:00
parent eafd3340bd
commit 4123238f6c
+3 -1
View File
@@ -34,7 +34,9 @@ export class TrackController {
const readStream = createReadStream(
this.service.getFolderName(track, track.playlist),
);
res.set({ 'Content-Disposition': `attachment; filename="${fileName}` });
res.set({
'Content-Disposition': `attachment; filename="${encodeURIComponent(fileName)}`,
});
return new StreamableFile(readStream);
}