Doing a custom file upload button like so:
CSS:
input[type="file"]::-webkit-file-upload-button{ visibility:hidden;width:0;height:0;}
input[type="file"]{font-size:30px !important;background:none !important;}
input[type="file"]::before{
content: 'Select an image';
display: inline-block;
background: -webkit-linear-gradient(top, #f9f9f9, #e3e3e3);
border: 1px solid #999;
border-radius: 3px;
outline: none;
white-space: nowrap;
-webkit-user-select: none;
cursor: pointer;
text-shadow: 1px 1px #fff;
font-size: 40px;
margin:auto auto;
text-align:center;
line-height:80px;
width:624px;
height:80px;border:0;border-radius:40px;
margin-left:-24px;
}
HTML:
<input name="uploaded_file" id="uploaded_file" type="file" onchange="thing()"/>
JS:
function thing(){
var t = document.getElementById("uploaded_file");
var f = t.files[0].name;
}
All I know is how to retrieve the name of the selected file to upload, but I can't figure out how to change the name of the button displayed. I can't figure out how to select that element since it has no ID or name. I read somewhere that using BEFORE will create a child of the element that created it, but when I get the element ('t' in this case) it says there are no children.