OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#45772] fixed avatar upload types
Eric Schubert56cccb06434a
diff --git a/frontend/src/app/core/file-upload/op-file-upload.service.ts b/frontend/src/app/core/file-upload/op-file-upload.service.tsindex 31c34c8f6cc..c597a4dca75 100644--- a/frontend/src/app/core/file-upload/op-file-upload.service.ts+++ b/frontend/src/app/core/file-upload/op-file-upload.service.ts@@ -103,6 +103,7 @@ export class OpenProjectFileUploadService {url:string,file:UploadFile|UploadBlob,method = 'post',+ responseType:'json'|'text' = 'json',):UploadInProgress {const formData = new FormData();const metadata = {@@ -119,7 +120,7 @@ export class OpenProjectFileUploadService {// Add the fileformData.append('file', file, metadata.fileName);- const observable = this.http.request<HalResource>(+ const observable = this.http.request(method,url,{@@ -127,7 +128,7 @@ export class OpenProjectFileUploadService {// Observe the response, not the bodyobserve: 'events',withCredentials: true,- responseType: 'json',+ responseType,// Subscribe to progress events. subscribe() will fire multiple times!reportProgress: true,},diff --git a/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts b/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.tsindex f07efce52c0..7a074dda269 100644--- a/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts+++ b/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts@@ -95,7 +95,7 @@ export class AvatarUploadFormComponent implements OnInit {public uploadAvatar(evt:Event) {evt.preventDefault();this.busy = true;- const upload = this.opFileUpload.uploadSingle(this.target, this.avatarFile, this.method);+ const upload = this.opFileUpload.uploadSingle(this.target, this.avatarFile, this.method, 'text');this.toastService.addAttachmentUpload(this.text.uploading, [upload]);upload[1].subscribe(@@ -116,7 +116,7 @@ export class AvatarUploadFormComponent implements OnInit {}},(error:any) => {- this.toastService.addError(error.error);+ this.toastService.addError(error);this.busy = false;});diff --git a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erbindex 89a25357ab7..c9e545ee00e 100644--- a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb+++ b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb@@ -11,7 +11,7 @@<p><%= t('repositories.storage.oauth_application_details') %><a- href="<%= URI::join(@oauth_application.integration.host, 'settings/admin/openproject').to_s %>"+ href="<%= File.join(@oauth_application.integration.host, 'settings/admin/openproject') %>"target="_blank"class="spot-link">