file upload preview in html

Solutions on MaxInterview for file upload preview in html by the best coders in the world

showing results for - "file upload preview in html"
Augustine
26 May 2017
1<html>
2<head>
3<script type='text/javascript'>
4function preview_image(event) 
5{
6 var reader = new FileReader();
7 reader.onload = function()
8 {
9  var output = document.getElementById('output_image');
10  output.src = reader.result;
11 }
12 reader.readAsDataURL(event.target.files[0]);
13}
14</script>
15<style>
16body
17{
18 width:100%;
19 margin:0 auto;
20 padding:0px;
21 font-family:helvetica;
22 background-color:#0B3861;
23}
24#wrapper
25{
26 text-align:center;
27 margin:0 auto;
28 padding:0px;
29 width:995px;
30}
31#output_image
32{
33 max-width:300px;
34}
35</style>
36</head>
37<body>
38<div id="wrapper">
39 <input type="file" accept="image/*" onchange="preview_image(event)">
40 <img id="output_image"/>
41</div>
42</body>
43</html>
queries leading to this page
file upload and image preview html templatehtml file upload and preview designjavascript image upload displayfile upload form html previewshow a preview of an image upload htmlhow to add preview og uploaded picture in htmlhtml file upload preview image template pre view file html5 jsjavascript preview image input filehtml file upload with previewhow to preview uploaded file in htmllive upload file in javascriptupload preview w3schoolfiles upload and display preview htmlupload and preview files in htmljs how to show image uploadedhtml image upload with previewpreview uploaded image in htmlhtml preview uploaded imageupload html file for previewhow to preview the uploaded image in htmlupload image with preview htmlpreview image load htmlpreview uploaded file htmlhtml preview imageimage preview before upload htmlhow to display preview of image to be uploaded using javascriptpreview file upload file htmlhtml show uploaded file previewfile upload with preview html csshow to open a upload a file to html and show previewimage video file upload with preview htmlhtml file preview librarypreview uploaded html filelive preview image uploadview uploaded images with jsupload any document preview htmlimage upload preview htmlhtml preview photo uploadupload image html previewhow to preview uploaded image in htmlhtml image upload previewhtml upload and preview imagehow to show image preview in htmlmedia upload with preview htmlselect image preview javascriptfile upload preview in htmlhow to show preview of image in htmlhow to show preview of uploaded image in htmlimage upload preview in html formfile upload preview javascriptjavascript show image from file inputfile upload and preview websitehtml preview file imagehtml form image upload previewfile upload html css preview js show image preview htmlhow to preview image in javascriptpreview file upload htmlhow to preview any document on upload in htmlhtml upload file and viewhtml upload file previewjpg preview in upload in htmlupload image and view jshtml5 file upload previewcreate a preview file in javascriptjs upload image previewhtml css image upload with previewhtml preview image uploadupload and preview an html filefile upload 26 image preview html templatepreview an image before its uploaded jsjs preview filejs display file choose image previewupload and preview image in htmlhtml file upload previewinput image upload previewhow to preview any uploaded file in htmlfile upload preview document htmljs img upload previewpreview image on upload htmlimage upload with preview htmlcreate image upload html preview show file upload input html previewjavascript preview imagehtml input file image previewfile upload preview in html