mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-13 14:12:50 +00:00
upload 直传移除 language
This commit is contained in:
parent
440c103fc1
commit
dfe78199a4
@ -53,7 +53,9 @@ request.interceptors.request.use(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 设置请求头中的语言
|
// 设置请求头中的语言
|
||||||
|
if (!req.headers['language'] !== null) {
|
||||||
req.headers['language'] = config.i18n.locale;
|
req.headers['language'] = config.i18n.locale;
|
||||||
|
}
|
||||||
|
|
||||||
// 验证 token
|
// 验证 token
|
||||||
if (user.token) {
|
if (user.token) {
|
||||||
|
|||||||
@ -60,7 +60,8 @@ export function useUpload() {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'multipart/form-data',
|
'Content-Type': 'multipart/form-data',
|
||||||
Authorization: isLocal ? user.token : null
|
Authorization: isLocal ? user.token : null,
|
||||||
|
language: null
|
||||||
},
|
},
|
||||||
timeout: 600000,
|
timeout: 600000,
|
||||||
data: fd as any,
|
data: fd as any,
|
||||||
@ -68,8 +69,7 @@ export function useUpload() {
|
|||||||
progress = e.total ? Math.floor((e.loaded / e.total) * 100) : 0;
|
progress = e.total ? Math.floor((e.loaded / e.total) * 100) : 0;
|
||||||
onProgress?.(progress);
|
onProgress?.(progress);
|
||||||
},
|
},
|
||||||
proxy: isLocal,
|
proxy: isLocal
|
||||||
NProgress: false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (type == 'minio') {
|
if (type == 'minio') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user