diff --git a/app/views/uploads/new.html.erb b/app/views/uploads/new.html.erb
index f1ca20c00..d41287c84 100644
--- a/app/views/uploads/new.html.erb
+++ b/app/views/uploads/new.html.erb
@@ -154,6 +154,13 @@
$("#filedropzone .dz-progress").hide();
});
this.on("addedfile", function(file) {
+ // replace the previous file with this one.
+ Danbooru.Upload.dropzone.files.forEach(f => {
+ if (f !== file) {
+ Danbooru.Upload.dropzone.removeFile(f);
+ }
+ });
+
var reader = new FileReader();
reader.addEventListener("loadend", function() {
var buf = new Danbooru.SparkMD5.ArrayBuffer();