This is my code and I need to select the file uploaded by the user display it on the screen and then use it in an API
<div class="first">
            <p><input type="file"  accept="image/*" name="image" id="file"  onchange="loadFile(event)"</p>
            <p><img id="output" width="200" /></p>
</div>
var loadFile = function(event) {
    var image = document.getElementById('output');
    image.src = URL.createObjectURL(event.target.files[0]);
    };
 
    