This commit is contained in:
2019-08-04 23:33:03 +02:00
parent 973fb6ebb7
commit 7bd42bda84

View File

@@ -1,6 +1,6 @@
import {base} from './urls';
import {HttpClient} from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {environment} from '../../environments/environment';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
@@ -11,7 +11,7 @@ export class DownloadService {
public get(songId: number, fileId: number, filename: string) { public get(songId: number, fileId: number, filename: string) {
return this.httpClient return this.httpClient
.get(base + '/api/songs/' + songId + '/files/' + fileId, { .get(`${environment.api}/api/songs/${songId}/files/${fileId}`, {
responseType: 'blob' as 'json', responseType: 'blob' as 'json',
observe: 'response' observe: 'response'
}) })