add: function (e, data) {
var before_size=formatFileSize(data.files[0].size);
var before_file_name=data.files[0].name;
if (!data.files[0].name.match(/.(jpg|jpeg|png|webp,png)$/i)){
var checktype='N';
}else{
var checktype='Y';
}
var tpl = $('<li class="working"><input type="text" value="0" data-width="48" data-height="48"'+
' data-fgColor="#0788a5" data-readOnly="1" data-bgColor="#fff" /><p></p><span></span></li><input type="hidden" name="hdd_filenm_'+row+'" id="hdd_filenm_'+row+'" value="'+before_file_name+'"><input type="hidden" id="hdd_file_size_'+row+'" name="hdd_file_size_'+row+'">'); //แสดงตัว process วงกลม
// แสดงชื่อไฟล์กับ file size
tpl.find('p').text(data.files[0].name)
.append('<i>' + formatFileSize(data.files[0].size) + '</i>');
// Add the HTML to the UL element
data.context = tpl.appendTo(ul);
// Initialize the knob plugin
tpl.find('input').knob();
// Listen for clicks on the icons.png to remove
tpl.find('span').click(function(){
if(tpl.hasClass('working')){
jqXHR.abort();
}
tpl.fadeOut(function(){
tpl.remove();
});
});
// Automatically upload the file once it is added to the queue
var jqXHR = data.submit();
row=parseInt(row)+1;
},