Change Default "choose File" Name To "upload File" With Same Functionality In Angularjs?
I used the below code and functionality is working fine but when I choose the file for first time then the upload file button gets shrink. When I inspect my code I saw Inspecte
Solution 1:
There is no way out there to change default behavior of input[type=file]
. There is a plugin that can help you out to achieve that
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="http://keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js"></script>
<link href="http://keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.css" rel="stylesheet"/>
<link href="http://keenthemes.com/preview/metronic/theme/assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
<div class="fileinput fileinput-new" data-provides="fileinput">
<span class="btn btn-default btn-file">
<span class="fileinput-new">Upload File</span>
<span class="fileinput-exists">Change File</span>
<input class="form-control" type="file" file-model="resume" ng-disabled="profileFilled==false;" />
</span>
<span class="fileinput-filename"></span>
<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">×</a>
</div>
Post a Comment for "Change Default "choose File" Name To "upload File" With Same Functionality In Angularjs?"