Skip to content

Instantly share code, notes, and snippets.

@RyanWarke
Last active March 23, 2023 22:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanWarke/f599b3e3fb0f6beaaf84 to your computer and use it in GitHub Desktop.
Save RyanWarke/f599b3e3fb0f6beaaf84 to your computer and use it in GitHub Desktop.
Dropzone.js refresh page on upload of mutiple files.
Dropzone.options.uploadImagesForm = {
maxFilesize: 3,
acceptedFiles: '.jpg, .jpeg, .png, .bmp',
init: function() {
this.on('success', function(){
if (this.getQueuedFiles().length == 0 && this.getUploadingFiles().length == 0) {
location.reload();
}
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment