Why can't I see the template-upload when I use add: in the fileUpload config
It doesn't work when add the option add: function(){}
$('#formpublicacion').fileupload({
dataType: 'json',
url: 'publicaciones/',
add: function (e, data){
$("#publicar").on('click', function () {
data.submit();
});
},
});
I replaced by this code
$('#fileupload').fileupload({
dataType: 'json',
add: function (e, data) {
var that = this;
//add this line
$.blueimp.fileupload.prototype.options.add.call(that, e, data);
$("#up_btn").on('click', function () {
data.submit();
});
},
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>