fixed wrongly generated http calls

This commit is contained in:
Timo Bejan 2020-10-19 11:24:10 +03:00
parent 60aa783f44
commit fc4888c6e2
3 changed files with 14 additions and 5 deletions

View File

@ -112,6 +112,7 @@ export class FilePreviewScreenComponent implements OnInit {
}
public fileReady(viewer: string) {
console.log('ready' , viewer);
this._readyViewers.push(viewer);
this._changeDetectorRef.detectChanges();
}

View File

@ -49,10 +49,12 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy {
}
ngOnInit() {
console.log('init viewer');
this.wvDocumentLoadedHandler = this.wvDocumentLoadedHandler.bind(this);
}
wvDocumentLoadedHandler(): void {
console.log('loaded');
this.wvInstance.setFitMode('FitPage');
this.fileReady.emit();
}
@ -61,6 +63,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy {
this._fileDownloadService.loadFile(this.fileType, this.fileId, (data) => {
this._fileData = data
}, () => this._fileData).subscribe(() => {
console.log('load viewer');
this._loadViewer(this._fileData);
})
}

View File

@ -142,8 +142,9 @@ export class FileUploadControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('get', `${this.basePath}/download/annotated/${encodeURIComponent(String(fileId))}`,
return this.httpClient.request('get', `${this.basePath}/download/annotated/${encodeURIComponent(String(fileId))}`,
{
responseType: 'blob',
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -201,8 +202,9 @@ export class FileUploadControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('get', `${this.basePath}/download/original/${encodeURIComponent(String(fileId))}`,
return this.httpClient.request('get', `${this.basePath}/download/original/${encodeURIComponent(String(fileId))}`,
{
responseType: 'blob',
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -260,8 +262,9 @@ export class FileUploadControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('get', `${this.basePath}/download/redacted/${encodeURIComponent(String(fileId))}`,
return this.httpClient.request('get', `${this.basePath}/download/redacted/${encodeURIComponent(String(fileId))}`,
{
responseType: 'blob',
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -325,8 +328,9 @@ export class FileUploadControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.request<any>('post', `${this.basePath}/download/report`,
return this.httpClient.request('post', `${this.basePath}/download/report`,
{
responseType: 'blob',
body: body,
params: queryParameters,
withCredentials: this.configuration.withCredentials,
@ -385,8 +389,9 @@ export class FileUploadControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('get', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`,
return this.httpClient.request('get', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`,
{
responseType: 'blob',
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,