This is an automated email from the ASF dual-hosted git repository.

jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new 866b7624a [AMORO-3308][Bugfix]: get signature check error when upload 
catalog config files (#3311)
866b7624a is described below

commit 866b7624a2f8cc2e498bdfd254a3907d7d513cff
Author: mansonliwh <[email protected]>
AuthorDate: Wed Oct 30 17:31:51 2024 +0800

    [AMORO-3308][Bugfix]: get signature check error when upload catalog config 
files (#3311)
    
    [AMORO-3308] file upload bugfix
---
 amoro-web/src/views/catalogs/Detail.vue | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/amoro-web/src/views/catalogs/Detail.vue 
b/amoro-web/src/views/catalogs/Detail.vue
index 682ee17f0..9cbad7763 100644
--- a/amoro-web/src/views/catalogs/Detail.vue
+++ b/amoro-web/src/views/catalogs/Detail.vue
@@ -93,6 +93,11 @@ const isEdit = computed(() => {
 const uploadUrl = computed(() => {
   return '/api/ams/v1/files'
 })
+const uploadHeaders = computed(() => {
+  return {
+    'X-Request-Source': 'Web'
+  };
+});
 const isNewCatalog = computed(() => {
   const catalog = (route.query?.catalogname || '').toString()
   return decodeURIComponent(catalog) === 'new catalog'
@@ -680,6 +685,7 @@ onMounted(() => {
               <a-upload
                 v-if="isEdit" v-model:file-list="config.fileList" name="file" 
accept=".xml"
                 :show-upload-list="false" :action="uploadUrl" 
:disabled="config.uploadLoading"
+                :headers="uploadHeaders"
                 @change="(args: UploadChangeParam<UploadFile<any>>) => 
uploadFile(args, config, 'STORAGE')"
               >
                 <a-button type="primary" ghost :loading="config.uploadLoading" 
class="g-mr-12">
@@ -729,6 +735,7 @@ onMounted(() => {
                 v-if="isEdit" v-model:file-list="config.fileList" name="file"
                 :accept="config.key === 'auth.kerberos.keytab' ? '.keytab' : 
'.conf'" :show-upload-list="false"
                 :action="uploadUrl" :disabled="config.uploadLoading"
+                :headers="uploadHeaders"
                 @change="(args: UploadChangeParam<UploadFile<any>>) => 
uploadFile(args, config)"
               >
                 <a-button type="primary" ghost :loading="config.uploadLoading" 
class="g-mr-12">

Reply via email to