I am trying to upload files using bootstrap, but I don’t know what I am doing, can someone tell me how to do this and how to get a preview of the image to upload, since the file upload is for uploading images to my site. Here is what I still have in html.
<form class="form-horizontal" enctype="multipart/form-data">
<div class="form-group">
<label class="control-label col-sm-2">Pic Name:</label>
<div class="col-xs-4">
<input type="text" class="form-control" name="profilepicname"></input>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Upload Pic:</label>
<div class="col-xs-3">
<input type="file" name="profilepic"></input>
</div>
</div>
</form>
There is also a large space between the image name and the file upload section of the web page. how can i get rid of this?
source
share