$(".dropzone").dropzone({ //if success success: function(file, response) { response = JSON.parse(response); // code here.. }, //if error error: function(file) { // code here.. } });