When the axios parameter is submitted with formdata, it cannot be changed from centent-type to multipart/form-data;.

Jun.21,2021

const http = axios.create()
http.interceptors.request.use(
  config => {
      // 
      if(...) {
          config.headers['content-type'] = 'application/x-www-form-urlencoded'
      }
  }
)

FormData using multipart/form-data is the specification.
xmlhttprequest-send

Menu