Skip to content

Commit b94cc44

Browse files
authored
Merge pull request #3712 from forbxy/master
fix:can't choose same file twice when in upload file
2 parents 237a310 + c339a34 commit b94cc44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notebook/static/tree/js/notebooklist.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ define([
338338
reader.onerror = reader_onerror;
339339
}
340340
});
341-
// Replace the file input form wth a clone of itself. This is required to
341+
// Clear fileinput value. This is required to
342342
// reset the form. Otherwise, if you upload a file, delete it and try to
343343
// upload it again, the changed event won't fire.
344344
var form = $('input.fileinput');
345-
form.replaceWith(form.clone(true));
345+
form.val('');
346346
return false;
347347
};
348348

0 commit comments

Comments
 (0)