An alternative was found, because, apparently, there is no way to initially receive a server response. The solution would be to change the internal components of jqueyry-file-upload, but I implemented it as follows:
In fileuploaddestroyed, I initiate a second Ajax call. This is not ideal, because it calls the second HTTP request, but it is the easiest quick implementation that I was thinking about
$('#fileupload').bind('fileuploaddestroyed', function() { destroyed_photo(); }); function destroyed_photo() { $.ajax({ url: ($('form#fileupload').attr('action') + '/my_method'), dataType: "text", type: 'GET', processData: false, contentType: 'application/json', success: function(data) { console.log(data); } }); }
source share