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

187
Views
Por qué la llamada ajax de WordPress muestra una solicitud incorrecta (0)

Estoy tratando de cargar archivos (imagen, video y zip) desde el front-end usando la llamada jQuery Ajax.

Aquí está el código jQuery:

 $(document).on("submit", "#add_training_video", function (e) { e.preventDefault(); var form = $(this); var actionUrl = handle.ajaxurl; var data = new FormData(this); $.ajax({ dataType: "html", type: "POST", url: actionUrl, data: data, processData: false, contentType: false, beforeSend: function () { $(".video-button").val("Please wait..."); $(".video-button").prop("disabled", true); }, success: function (data) { $(".video-button").val("Add A New Video"); $(".video-button").prop("disabled", false); $(".ajax_response").html(data); // console.log(data); // $(".ajax_response").html(""); // if(!data.success) { // data.message.forEach(function(key, ele){ // $(".ajax_response").append("<div class='error-message'>" + key +"</div>"); // }); // } else { // $(".ajax_response").append("<div class='success-message'>" + data.message +"</div>"); // } }, }); });

Ahora, si subo un archivo que tiene más de 5 MB, obtendré un 0 o una Solicitud incorrecta de la respuesta de ajax.

¿Puedes decirme porque?

¡Gracias!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Su servidor tiene un límite de tamaño de archivo POST de 5 MB (configuración predeterminada).

Edite su configuración de php.ini con líneas:

 post_max_size=20M upload_max_filesize=20M
over 4 years ago · Santiago Trujillo Report
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!