Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

too much recursion when uploading image

Tags:

jquery

ajax

When i am trying to upload image via ajax in local, browser show the error too much recursion. so i couldn't test that in locally, but its works in production on heroku

$('#fileupload_pers').fileupload({ 
    url: '/create_img_prs',
    add: function (e, data) {
                    $('#upload_pers').html('<p class="upl label label- 
success">Uploading....please wait</p>');
                    data.submit();
                },
    success: function (r) {
            //$('#upload').remove();
            $('#upload_pers').empty();
            $('#upload_pers').html('<p class="upl label label-success">Successfully 
 Uploaded Image</p>') ;
            $('#id_poster_pers').attr('value',r["id"]);
            $('#upload_pers').fadeOut(6000);
            }
  });
like image 570
amtest Avatar asked Feb 15 '23 16:02

amtest


1 Answers

The error 'too much recursion' can be caused by (accidently) including jquery.fileupload.js twice.

https://github.com/blueimp/jQuery-File-Upload/issues/2814

like image 156
Pieter Avatar answered Feb 19 '23 03:02

Pieter