mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: i18n not working when uploading Excel files
This commit is contained in:
@@ -9,6 +9,7 @@ import { genFileId, type UploadInstance, type UploadProps, type UploadRawFile }
|
||||
import { useCache } from '@/utils/useCache.ts'
|
||||
import { settingsApi } from '@/api/setting.ts'
|
||||
import ccmUpload from '@/assets/svg/icon_ccm-upload_outlined.svg'
|
||||
import { getLocale } from '@/utils/utils.ts'
|
||||
|
||||
const { t } = useI18n()
|
||||
const { wsCache } = useCache()
|
||||
@@ -25,7 +26,8 @@ const uploadRef = ref<UploadInstance>()
|
||||
const uploadLoading = ref(false)
|
||||
|
||||
const token = wsCache.get('user.token')
|
||||
const headers = ref<any>({ 'X-SQLBOT-TOKEN': `Bearer ${token}` })
|
||||
const locale = getLocale()
|
||||
const headers = ref<any>({ 'X-SQLBOT-TOKEN': `Bearer ${token}`, 'Accept-Language': locale })
|
||||
const getUploadURL = () => {
|
||||
return import.meta.env.VITE_API_BASE_URL + props.uploadPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user