mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix upload related content (#2019)
This commit is contained in:
committed by
Eugenio Romano
parent
2768b68168
commit
e30a1aed30
@@ -134,8 +134,8 @@ export class ActivitiContentService {
|
|||||||
return icon || ActivitiContentService.DEFAULT_MIME_TYPE_ICON;
|
return icon || ActivitiContentService.DEFAULT_MIME_TYPE_ICON;
|
||||||
}
|
}
|
||||||
|
|
||||||
createTaskRelatedContent(taskId: string, file: any) {
|
createTaskRelatedContent(taskId: string, file: any, opts?: any) {
|
||||||
return Observable.fromPromise(this.apiService.getInstance().activiti.contentApi.createRelatedContentOnTask(taskId, file))
|
return Observable.fromPromise(this.apiService.getInstance().activiti.contentApi.createRelatedContentOnTask(taskId, file, opts))
|
||||||
.catch(err => this.handleError(err));
|
.catch(err => this.handleError(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -54,7 +54,10 @@ export class ActivitiCreateTaskAttachmentComponent implements OnChanges {
|
|||||||
|
|
||||||
for (let fileInfoObj of filesList) {
|
for (let fileInfoObj of filesList) {
|
||||||
let file: File = fileInfoObj;
|
let file: File = fileInfoObj;
|
||||||
this.activitiContentService.createTaskRelatedContent(this.taskId, file).subscribe(
|
let opts = {
|
||||||
|
isRelatedContent: true
|
||||||
|
};
|
||||||
|
this.activitiContentService.createTaskRelatedContent(this.taskId, file, opts).subscribe(
|
||||||
(res) => {
|
(res) => {
|
||||||
this.success.emit(res);
|
this.success.emit(res);
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user