Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

424
Visualizações
JQuery AJAX post issue while uploading the EXCEL file

My code snippet is below

function uploadFile(file, action){
   var fd = new FormData();
   fd.append('file_data', file);
   $.ajax({
            type: 'POST',
            data: fd,
            processData: false,
            url: reload_url,
            contentType: false,
            async: false,
            cache: false,
            complete: function (xhr, status) {
                if (status != 'success' ) {
                     console.log("Complete",xhr.response, status, file.name);
                }
            },
            error:function(data){
                console.log("Failed ",data);
                alert("Failed to upload file");
            },
            timeout: 30000,
        });

}

While I am posting the data with less file size(< 1MB) then it is working , But if the file is > 3MB then it is failing with error sig : net::ERR_CONNECTION_RESET And the status response is : "NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load

Can anybody please help on this issue.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda