From 386de0df1099ab704c1866d3370147652687cee4 Mon Sep 17 00:00:00 2001 From: varung Date: Wed, 7 Sep 2016 18:34:51 -0700 Subject: [PATCH] clear file input after event allows same file to be uploaded twice --- bootstrap.file-input.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap.file-input.js b/bootstrap.file-input.js index 8a566b3..b45c9c5 100644 --- a/bootstrap.file-input.js +++ b/bootstrap.file-input.js @@ -96,7 +96,8 @@ $.fn.bootstrapFileInput = function() { var fileName; fileName = $(this).val(); - + $(this).val(null); + // Remove any previous file names $(this).parent().next('.file-input-name').remove(); if (!!$(this).prop('files') && $(this).prop('files').length > 1) {