// Variable for holding the file list.
var fileList = [];
$(function () {
$('#fileupload').fileupload({
dataType: 'json',
done: function (e, data) {
// $("#uploaderContainer tr:has(td)").remove();
//fileList = [];
$.each(data.result, function (index, file) {
$("#uploaded-files").append(
$('
')
.append($(' | ').text(file.fileName))
.append($(' | ').text(file.fileSize))
.append($(' | ').text(file.fileType))
//.append($(' | ').text(file.uniqueFileName))
//.append($(' | ').html("Click"))
//.append($(' | ').text("@niko"))
)//end $("#uploaded-files").append()
fileList.push(file.uniqueFileName);
console.log("myupload js - file = " + file.fileName);
});
},
progressall: function (e, data) {
const progress = parseInt(data.loaded / data.total * 100, 10);
$('#progress .bar').css(
'width',
progress + '%'
);
},
dropZone: $('#dropzone')
})
.bind('fileuploadsubmit', function (e, data) {
// The example input, doesn't have to be part of the upload form:
var twitter = $('#twitter');
data.formData = {twitter: twitter.val()};
});
});