JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<div class="multiple">
                        <input class="btn-review file full" type="file" multiple name="contact_attachment" id="contact_attachment" value=""/>
                    </div>

JavaScript

$('.multiple').on('change','.file',function() {
            var i = 0;
            var n = $('.file').length;
            var items = n + 1;
            $(this).attr("id",'contact_attachment' + items)
            $('.multiple').prepend('<input class="btn-review file full " type="file" multiple name="contact_attachment1" id="contact_attachment " value=""/>');
        });