diff --git a/etools-upload.html b/etools-upload.html
index e8ede00..16824be 100644
--- a/etools-upload.html
+++ b/etools-upload.html
@@ -241,6 +241,8 @@
return;
}
+ this._fireChangeFileEventIfApplicable();
+
this.resetStatus();
this.resetValidations();
@@ -252,6 +254,13 @@
}
}
+ _fireChangeFileEventIfApplicable() {
+ if (this.fileUrl && !isNaN(this.fileUrl)) {
+ // if fileUrl is a number , then the previous upload was not saved
+ this.fireEvent('change-unsaved-file');
+ }
+ }
+
_handleUpload() {
this.uploadInProgress = true;
this.fireEvent('upload-started');