import {Injectable} from '@angular/core'; import {HttpClient} from '@angular/common/http'; import {Observable} from 'rxjs'; import {environment} from '@env/environment'; @Injectable({providedIn: 'root'}) export class FileStorageManagerService { public resourceUrl = `${environment.apiUrl}/api`; constructor(protected http: HttpClient) {} downloadDocumentByPath(filePath: string): Observable { const options = {}; return this.http.get(`${this.resourceUrl}/get-file/${filePath}`, {params: options, observe: 'response'}); } }