[MNT-21789] ADW - Disable ACS Thumbnail Generation cause ADF Upload Service to fail any file upload with 501 error (#6114)

* Disable ACS Thumbnail Generation cause ADF Upload Service to fail any file upload with 501 error

* * fixed config
This commit is contained in:
dhrn
2020-09-10 23:21:50 +05:30
committed by GitHub
parent 14f08f2178
commit e765239cbf
7 changed files with 89 additions and 26 deletions

View File

@@ -16,21 +16,34 @@
*/
import { Injectable } from '@angular/core';
import { from, throwError, Observable } from 'rxjs';
import { from, merge, Observable, BehaviorSubject, throwError } from 'rxjs';
import { BpmProductVersionModel, EcmProductVersionModel } from '../models/product-version.model';
import { AlfrescoApiService } from './alfresco-api.service';
import { map, catchError } from 'rxjs/operators';
import {
SystemPropertiesRepresentation,
Activiti
} from '@alfresco/js-api';
import { catchError, filter, map, switchMap } from 'rxjs/operators';
import { Activiti, SystemPropertiesRepresentation } from '@alfresco/js-api';
import { AuthenticationService } from './authentication.service';
@Injectable({
providedIn: 'root'
})
export class DiscoveryApiService {
constructor(private apiService: AlfrescoApiService) { }
/**
* Gets product information for Content Services.
*/
ecmProductInfo$ = new BehaviorSubject<EcmProductVersionModel>(null);
constructor(
private apiService: AlfrescoApiService,
private authenticationService: AuthenticationService) {
merge(this.apiService.alfrescoApiInitialized, this.authenticationService.onLogin)
.pipe(
filter(() => this.apiService.getInstance()?.isEcmLoggedIn()),
switchMap(() => this.getEcmProductInfo())
)
.subscribe((info) => this.ecmProductInfo$.next(info));
}
/**
* Gets product information for Content Services.
@@ -63,10 +76,10 @@ export class DiscoveryApiService {
public getBPMSystemProperties(): Observable<SystemPropertiesRepresentation> {
return from(this.systemPropertiesApi.getProperties())
.pipe(
map( (res) => {
if ('string' === typeof(res)) {
map((res) => {
if ('string' === typeof (res)) {
throw new Error('Not valid response');
}
}
return res;
}),
catchError((err) => throwError(err.error))