From eb084d03b2cce4ae6608a91768c4ed2d7cae0286 Mon Sep 17 00:00:00 2001 From: Isaac Grynsztein Date: Sat, 28 Mar 2020 08:04:45 -0400 Subject: [PATCH] Downloaded file names are now converted to their fully decoded forms --- src/app/main/main.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index 2279574..3d0a66f 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -717,7 +717,7 @@ export class MainComponent implements OnInit { this.postsService.downloadFileFromServer(name, 'audio').subscribe(res => { this.downloading_content['audio'][name] = false; const blob: Blob = res; - saveAs(blob, name + '.mp3'); + saveAs(blob, decodeURIComponent(name) + '.mp3'); if (!this.fileManagerEnabled) { // tell server to delete the file once downloaded @@ -734,7 +734,7 @@ export class MainComponent implements OnInit { this.postsService.downloadFileFromServer(name, 'video').subscribe(res => { this.downloading_content['video'][name] = false; const blob: Blob = res; - saveAs(blob, name + '.mp4'); + saveAs(blob, decodeURIComponent(name) + '.mp4'); if (!this.fileManagerEnabled) { // tell server to delete the file once downloaded