Spaces:
Runtime error
Runtime error
Commit
·
b1e2ada
1
Parent(s):
24bca3c
fix: can't drop same file again
Browse filesfile_drop.vue script of FileDropMultiple component
doesn't allow uploading same file. This is a problem especially
when a user tries to make tests with the same set of files.
tomorrowcities/components/file_drop.vue
CHANGED
|
@@ -26,6 +26,8 @@ module.exports = {
|
|
| 26 |
|
| 27 |
this.$refs.dropzone.addEventListener('drop', async event => {
|
| 28 |
event.preventDefault();
|
|
|
|
|
|
|
| 29 |
const items = await Promise.all([...event.dataTransfer.items]);
|
| 30 |
const files = items.map(i => i.webkitGetAsEntry())
|
| 31 |
const fileHolders = files.filter(f => f.isFile)
|
|
|
|
| 26 |
|
| 27 |
this.$refs.dropzone.addEventListener('drop', async event => {
|
| 28 |
event.preventDefault();
|
| 29 |
+
// Clear file information before processing new files
|
| 30 |
+
this.jupyter_clear();
|
| 31 |
const items = await Promise.all([...event.dataTransfer.items]);
|
| 32 |
const files = items.map(i => i.webkitGetAsEntry())
|
| 33 |
const fileHolders = files.filter(f => f.isFile)
|