Use new upload methods for edit community profile form. Update library and assets

This commit is contained in:
Konstantinos Triantafyllou 2021-11-26 11:51:24 +02:00
parent 318e7a2c63
commit 66f9320d9e
3 changed files with 5 additions and 4 deletions

@ -1 +1 @@
Subproject commit 7ef741c205a3659e28d1f8521a37e2cc0d969de5
Subproject commit 1fbb461faa26047e350ab3319684f7ab62154c3e

View File

@ -198,7 +198,7 @@ export class EditCommunityComponent {
public save(callback: Function, errorCallback: Function = null) {
if (this.file) {
this.communityFb.get('shortName').enable();
this.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/stakeholder/" + encodeURIComponent(this.communityFb.value.communityId), this.file).subscribe(res => {
this.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/community/" + encodeURIComponent(this.community.communityId), this.file).subscribe(res => {
this.deletePhoto();
this.communityFb.get('logoUrl').setValue(res.filename);
this.removePhoto();
@ -312,7 +312,8 @@ export class EditCommunityComponent {
public deletePhoto() {
if (this.community.logoUrl && this.community.isUpload) {
this.subscriptions.push(this.utilsService.deletePhoto(this.properties.utilsService + '/delete/stakeholder/' + this.community.logoUrl).subscribe());
this.subscriptions.push(this.utilsService.deletePhoto(this.properties.utilsService + '/delete/community/' +
encodeURIComponent(this.community.communityId) + '/' + this.community.logoUrl).subscribe());
}
}
}

@ -1 +1 @@
Subproject commit 999d3833d3805534677aa741a3759e26e09b50f2
Subproject commit 28db142aa54b8bea87ada52dbae2da7c7da8f458