I would like to use this javascript: https://github.com/buzz/mediainfo.js
I want to implement in the Dropzone success event a call to the functions present in mediainfo.js
var varFunc_Dropzone = function () {
var dzone_upload_show_poster = function () {
$('#dzone_poster').dropzone({
url: "../../assets/system/sys_upload_manager.php",
method: "POST",
paramName: "file",
acceptedFiles: "image/*",
maxFiles: 1,
maxFilesize: 1, // MB
uploadMultiple: false,
thumbnailWidth: null,
thumbnailHeight: null,
addRemoveLinks: true,
timeout: 180000,
dictRemoveFileConfirmation: "Sicuro?",
dictFileTooBig: "File grande ({{filesize}}mb). Massimo consentito {{maxFilesize}}mb",
dictInvalidFileType: "Tipo di file non valido",
dictCancelUpload: "Cancella",
dictRemoveFile: "Rimuovi",
dictMaxFilesExceeded: "Sono consentiti un massimo di {{maxFiles}} file",
dictDefaultMessage: "Trascina il file qui per effettuare Upload",
success: function(file, done) {
// implement the trigger here for request MediaInfo with mediainfo.js
// I try:
// get_file_info(MediaInfo({ format: 'text' }, {file}));
// var xFile = MediaInfo({ format: 'text' }, (mediainfo) => {file});
// var xFile = MediaInfo({ format: 'text' }, (mediainfo) => onChangeFile(file));
}
});
}
return {
init: function() {
dzone_upload_show_poster();
}
};
}();
KTUtil.ready(function() { varFunc_Dropzone.init(); });
Thank you! I hope you will be able to help me!!!