When I try to upload an image via ajax in local mode, the browser shows an error of too much recursion . so I couldn’t check it locally, but his work in production is on a hero
$('#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); } });
source share