File Upload preview
< input type = "file" class = "form-control" name = "productPhoto1" onchange = " preview ('productPhoto1Src'); " /> function preview ( imgSrc ) { var fileBlob = URL . createObjectURL ( event . target . files [ 0 ]); $ ( "#" + imgSrc ). attr ( 'src' , test123 ); }