Auto backup \2026-\04-\20
|
After Width: | Height: | Size: 363 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -20,6 +20,14 @@ api.interceptors.request.use(
|
||||
if (token) {
|
||||
config.headers.Authorization = `Bearer ${token}`
|
||||
}
|
||||
// FormData 上传必须移除 JSON 默认 Content-Type,让浏览器自动加 multipart boundary
|
||||
if (typeof FormData !== 'undefined' && config.data instanceof FormData) {
|
||||
if (typeof config.headers.delete === 'function') {
|
||||
config.headers.delete('Content-Type')
|
||||
} else {
|
||||
delete config.headers['Content-Type']
|
||||
}
|
||||
}
|
||||
return config
|
||||
},
|
||||
(error) => Promise.reject(error)
|
||||
|
||||