URL.createObjectURL
https://learn.javascript.ru/blob<script>
function preview() {
frame.src=URL.createObjectURL(event.target.files[0]);
}
</script>
<form>
<input type="file" onchange="preview()">
<img id="frame" src="" width="100px" height="100px"/>
</form>