mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-5426] Remove compatibility layer from Lib (#7110)
* remove compatibility step 1 * remove compatibility step 2 * remove compatibility step 3 * remove compatibility step 4 * remove compatibility step 5
This commit is contained in:
@@ -18,14 +18,18 @@
|
||||
import { AlfrescoApiService, AppConfigService, DiscoveryApiService, UploadService } from '@alfresco/adf-core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { throwError } from 'rxjs';
|
||||
import { ActivitiContentApi } from '@alfresco/js-api';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TaskUploadService extends UploadService {
|
||||
|
||||
private contentApi: ActivitiContentApi;
|
||||
|
||||
constructor(protected apiService: AlfrescoApiService, appConfigService: AppConfigService, discoveryApiService: DiscoveryApiService) {
|
||||
super(apiService, appConfigService, discoveryApiService);
|
||||
this.contentApi = new ActivitiContentApi(apiService.getInstance());
|
||||
}
|
||||
|
||||
getUploadPromise(file: any): any {
|
||||
@@ -33,7 +37,7 @@ export class TaskUploadService extends UploadService {
|
||||
isRelatedContent: true
|
||||
};
|
||||
const taskId = file.options.parentId;
|
||||
const promise = this.apiService.getInstance().activiti.contentApi.createRelatedContentOnTask(taskId, file.file, opts);
|
||||
const promise = this.contentApi.createRelatedContentOnTask(taskId, file.file, opts);
|
||||
|
||||
promise.catch((err) => this.handleError(err));
|
||||
|
||||
|
Reference in New Issue
Block a user