I need to listen to file select event whenever user selects a file (on repeated clicks of the browse button).
However, if the user selects the same file as previously, the change
event does not fire. Is there some other event I could listen to, or other solution to this problem?
(function() {
$('.file_upload').on('change', function() {
console.log('Changed!');
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<label class="btn btn-primary">File #1 <input name="file1" id="file1" class="file_upload a1" type="file" /></label>