0

Im trying to do an ajax call to an url and passing a few parameters.

this is the ajax call:

$.ajax({
                    url: "../../../lib/pscover.php",
                    type: "POST",
                    data: $("#formdatos").serialize(),
                    dataType: "json",
                    cache:false, //Para que el formulario no guarde cache
                    success: function(response) {

and this is the call im serializing:

<input type="hidden"    name="PRESUPUESTO"  id="presuemail">
            <input type="hidden"    name="CLIENTE"  id="clienteemail">
            <!-- <input type="hidden"   name="HTML" id="htmlemail"> -->
            <input type="hidden"    name="PDF"  id="pdfemail">

PRESUPUESTO has the value 877

CLIENTE has the value 3

but PDF has an string whose size is 3.5MB.

if i remove PDF field it works perfectly but when i pass it, then is giving me the 404 error.

What can i do?

  • 1
    You don't get a 404 error because of the size of the data. You get that error when the URL is wrong. – Barmar Jul 02 '21 at 10:37
  • This seems more like a server side problem than a client side problem. Watch out though when sending big data through JSON as the whole thing will have to be parsed on the server side. – Ian Jul 02 '21 at 10:39

0 Answers0