Skip to content

Commit

Permalink
[AMORO-3308][Bugfix]: get signature check error when upload catalog c…
Browse files Browse the repository at this point in the history
…onfig files (#3311)

[AMORO-3308] file upload bugfix
  • Loading branch information
mansonliwh authored Oct 30, 2024
1 parent 1d9de04 commit 866b762
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions amoro-web/src/views/catalogs/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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">
Expand Down

0 comments on commit 866b762

Please sign in to comment.