Skip to content

Commit

Permalink
Fix an issue when we have to upload the same file twice (#1)
Browse files Browse the repository at this point in the history
* Set value to null after set file to allow upload the same file

* Use display none instead of opacity to 0
  • Loading branch information
RoXuS authored and eterna2 committed Jan 9, 2018
1 parent 323e858 commit 5e3d8df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion file-drop-zone.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h3>Drop your file here</h3>
@apply(--layout-center-justified);
}
#files {
opacity: 0;
display: none;
}
</style>

Expand Down Expand Up @@ -275,6 +275,7 @@ <h3>Drop your file here</h3>
this._setLastError(null);
this._setFiles(this._toArray(e.target.files));
this.dispatchEvent(new CustomEvent('selected', {detail: e.target.files}));
this.$.files.value = null;
}

_onFileDrop(e) {
Expand All @@ -293,6 +294,7 @@ <h3>Drop your file here</h3>
if (ok) {
this._setFiles(this._toArray(files));
this.dispatchEvent(new CustomEvent('selected', {detail: files}));
this.$.files.value = null;
}
}

Expand Down

0 comments on commit 5e3d8df

Please sign in to comment.