too much recursion when uploading image

ajax, jquery

Solution

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

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

Problem

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); } }); ```

Original source