Take data from a dataForm sent by ajax, in a servlet

0

I am sending a file and a parameter through ajax through a dataForm, but I can not get that data in the servlet, nor using the request for the parameter that is a text. So I send the data through ajax

    var modulo = "subirArchivo";
    var archivo = new FormData();
    archivo.append("archivo",$("#documentoPersonal")[0]);
    archivo.append("modulo",modulo);

 $.ajax({
    type: "POST",
    url: "../ServletMainController",
    data: archivo,
    cache: false,
    contentType: false,
    processData: false,
    success: function (msg) {

    },
    error: function (msg) {

    }
});
    
asked by Jeisson Hernandez 27.08.2018 в 22:28
source

0 answers