Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
Reanude el formulario de carga de Ajax cuando Internet esté conectado

Cuando el Internet del usuario está conectado, la carga finaliza y, mientras se carga, Internet se desconecta repentinamente y la carga del formulario falla. (status = (failed)net::ERR_INTERNET_DISCONNECTED, Type = xhr)

¿Existe un código que reanude el formulario de carga después de conectarse a Internet?

Este es mi código de carga que se envía como Ajax:

 $('#form_upload_create').submit(function (e) { e.preventDefault(); $form = $(this) var formData = new FormData(this); $.ajax({ url: window.location.pathname, type: 'POST', data: formData, cache: false, contentType: false, processData: false, success: function (response) { alert(response.message) } }, xhr: function () { //upload Progress var xhr = $.ajaxSettings.xhr(); if (xhr.upload) { xhr.upload.addEventListener('progress', function (event) { var percent = 0; var position = event.loaded || event.position; var total = event.total; if (event.lengthComputable) { percent = Math.ceil(position / total * 100); } //update progressbar $(".progress-bar").css("width", +percent + "%"); $(".status").text(percent + "%" + 'waiting upload...'); }, true); } return xhr; }, });

});

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!