Reset file upload form after an upload.

This commit is contained in:
Brian E. Granger 2014-01-29 15:53:20 -08:00
parent 9fbeaa1e37
commit d21258bbcc

View File

@ -92,6 +92,11 @@ var IPython = (function (IPython) {
});
}
}
// Replace the file input form wth a clone of itself. This is required to
// reset the form. Otherwise, if you upload a file, delete it and try to
// upload it again, the changed event won't fire.
var form = $('input.fileinput');
form.replaceWith(form.clone(true));
return false;
};