Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion backend/common/utils/whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"/system/assistant/info/*",
"/system/assistant/app/*",
"/system/assistant/picture/*",
"/datasource/uploadExcel",
"/system/authentication/platform/status",
"/system/authentication/login/*",
"/system/authentication/sso/*",
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/views/ds/DatasourceForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { setSize } from '@/utils/utils'
import EmptyBackground from '@/views/dashboard/common/EmptyBackground.vue'
import icon_fileExcel_colorful from '@/assets/datasource/icon_excel.png'
import IconOpeDelete from '@/assets/svg/icon_delete.svg'
import { useCache } from '@/utils/useCache'

const props = withDefaults(
defineProps<{
Expand Down Expand Up @@ -128,6 +129,10 @@ const close = () => {
saveLoading.value = false
}

const { wsCache } = useCache()
const token = wsCache.get('user.token')
const headers = ref<any>({ 'X-SQLBOT-TOKEN': `Bearer ${token}` })

const initForm = (item: any, editTable: boolean = false) => {
isEditTable.value = false
keywords.value = ''
Expand Down Expand Up @@ -539,6 +544,7 @@ defineExpose({
v-if="form.filename && !form.id"
class="upload-user"
accept=".xlsx,.xls,.csv"
:headers="headers"
:action="getUploadURL"
:before-upload="beforeUpload"
:on-error="onError"
Expand All @@ -554,6 +560,7 @@ defineExpose({
v-else-if="!form.id"
class="upload-user"
accept=".xlsx,.xls,.csv"
:headers="headers"
:action="getUploadURL"
:before-upload="beforeUpload"
:on-success="onSuccess"
Expand Down