$(document).ready(function(){
Dropzone.autoDiscover = false;
var dropzone = new Dropzone (".dropzone", {
maxFilesize: 256, // Set the maximum file size to 256 MB
paramName: "document[attachment]", // Rails expects the file upload to be something like model[field_name]
addRemoveLinks: true // Don't show remove links on dropzone itself.
});
dropzone.on("removedFile", function(file){
alert('remove triggered');
});
dropzone.on("addedFile", function(file){
alert('add triggered');
});
dropzone.on("success", function(file){
alert('success triggered');
});
});
I could get he success event, however I cannot get removedFile event when I delete the file from drop zone. Also it cannot trigger addedFile event even the file has been uploaded successfully to my server.
in my js file, I have set up something like this:
I could get he success event, however I cannot get
removedFile
event when I delete the file from drop zone. Also it cannot triggeraddedFile
event even the file has been uploaded successfully to my server.Is there anything I miss here? Thanks in advance.