My script works fine with jQuery 1.x and 2.x, but it doesn't work with jQuery 3.x
imageInput.fileupload();
var jqXHR = imageInput.fileupload('send', {
files: files,
formData: $.extend({csrfmiddlewaretoken: csrftoken}, attachmentData),
url: {{ id }}_settings.url.upload_attachment,
})
.success(function (result, textStatus, jqXHR) {
$.each(result.files, function (index, file) {
console.log('success');
});
})
.error(function (jqXHR, textStatus, errorThrown) {
console.log('error occurred.');
});
The FF browser complains that success and error function is NOT found.
jQuery.Deferred exception: imageInput.fileupload(...).success is not a function
....
undefined
This is the error message. Thank you for your help.