1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

fix(volume-browser): download capability for all types of files (#2954)

This commit is contained in:
Pedro Henrique 2019-06-21 10:44:29 -03:00 committed by xAt0mZ
parent f3b9668629
commit 96f266adf6
3 changed files with 5 additions and 3 deletions

View file

@ -42,7 +42,7 @@ function (HttpRequestHelper, VolumeBrowserService, FileSaver, Blob, ModalService
var filePath = this.state.path === '/' ? file : this.state.path + '/' + file;
VolumeBrowserService.get(this.volumeId, filePath)
.then(function success(data) {
var downloadData = new Blob([data.file], { type: 'text/plain;charset=utf-8' });
var downloadData = new Blob([data.file]);
FileSaver.saveAs(downloadData, file);
})
.catch(function error(err) {