perf: 已经是 FormData 对象的不用再次转换
在特定条件下,FormData 转 FormData 会存在问题。
This commit is contained in:
parent
898a507581
commit
d582ad428f
|
@ -14,7 +14,8 @@ const defaultRequestInterceptors = (config: InternalAxiosRequestConfig) => {
|
|||
} else if (
|
||||
TRANSFORM_REQUEST_DATA &&
|
||||
config.method === 'post' &&
|
||||
config.headers['Content-Type'] === 'multipart/form-data'
|
||||
config.headers['Content-Type'] === 'multipart/form-data' &&
|
||||
!(config.data instanceof FormData)
|
||||
) {
|
||||
config.data = objToFormData(config.data)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue