JSFiddle - React, Tailwind, and code Playground

HTML

<input id="id_file_field" name="file_field" type="file" style="display:none" value="" />
<input type="button" name="save" id="upload_file" value="save"/>

JavaScript

$(document).ready(function () {
    $("#upload_file").click(function () {
        $("#id_file_field").trigger('click');
    });
    
    $('#id_file_field').change(function () {
        var value = $(this).val();
        var name = value.split(/[\\/]/);
        alert(name[name.length - 1]);
    });
});