Dropzone.autoDiscover = false;
$(function() {
var myDropzone = new Dropzone("#dropzone");
myDropzone.on("success", function(file,response) {
console.log("raw response: "+response);
if(response==null || response =="null")
$("#uploadinfo").append("
Error uploading "+file.name+"
Reason is unknown :(
")
else
{
var o = JSON.parse(response);
if(o.status=='ok')
$("#uploadinfo").append("")
else if(o.status=='err')
$("#uploadinfo").append("Error uploading "+file.name+"
Reason: "+o.reason+"
")
console.log(o)
}
});
})