Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
How do I change jquery ajaxForm to axios?

How do I change jquery ajaxForm to axios?

Now the following ajaxForm exists.

        $("#ccForm").ajaxForm({
            url: '/api/cc/registCcInfo',
            type: 'post',
            dataType: 'json',
            beforeSend: function (xhr) {
                xhr.setRequestHeader("Authorization", `Bearer ` + getCookie("deviceToken"));
            },
            success: function (response) {
                response.status = 200;
                response.data = {};
                response.data.resultCd = response.resultCd;
                response.data.resultMsg = response.resultMsg;
                modal.querySelector("button.close").click();

formData looks like this:

{
    "ccNo": "",
    "ccName": "aa",
    "ccAddress": "",
    "ccTel": "",
    "ccX": "",
    "ccY": "",
    "perPage": 10,
    "file": File
lastModified: 1642483829515
lastModifiedDate: Tue Jan 18 2022 14:30:29 GMT+0900 (Korean Standard Time) {}
name: "3683.jpg"
size: 195096
type: "image/jpeg"
webkitRelativePath: ""
[[Prototype]]: File
}

I want to change this data to axios at once. I can't figure out how the input type passes both text as well as file .

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda