I was wondering if this is doable? Google comes up with nothing.
Basically i want to my button to simulate when selected, allowing users to upload files. I've read its possible with labels, but i need to do with a button to do UX/UI
<button style="position:fixed;bottom:10px;right:70px" type="button" class="btn btn-default">
<input type="file" id="files" visbility="hidden" />
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
</button>
Currently my button looks like this: to this:
try an opacity of 0
https://jsfiddle.net/m4e0y2o3/12/
plus fallbacks if you what to support older browsers
Simple Method with beautiful input file [type="file"].
Output Image URL - https://i.stack.imgur.com/4Jl0H.jpg
You can actually do it with
label
, you just have to hide theinput
.Something like this will do:
You can use the following to make an input type "file" hidden with a button: