-2
Watch the image;
Now look at the code;
<div class="form-control pl-0" style="border: 0px solid">
<input type="file" name="arquivoMov" id="arquivoMov" accept=".pdf"
(change)="selecionarArquivoMovManual($event)">
</div>
Hey, guys, good afternoon. Guys, how do I rename the html input file button in Angular? Because this button behaves in every browser (IE, Mozile, Chrome and Safari) with the different name.
I would put it as fixed so there is no change when going to different browser.
I found this link, to see if facilitate help me, please.
Change input text type=file with filename
This is the current behavior of figure 1
I made some changes to mask the component, but it was not the same with the original nor figure 1
<button>
<label for="arquivoMov">
Escolher ficheiro
<input type="file" name="arquivoMov" id="arquivoMov" accept=".pdf"
(change)="selecionarArquivoMovManual($event)" hidden>
</label>
</button>
She got this behavior from figure 2
The problem now is to try to fix the button, that by selecting the button it manages to catch the file name.
Other: https://answall.com/questions/119760/stilizar-input-type-file
– LeAndrade
@Leandrade I thank you for your two suggestions, it is not a duplicate because I want to rename the input file using typescript, your second suggestion will not help much because my problem is not to style input but put the name of the input as fixed;
– wladyband
If what you want is to rename the button that is clicked to open the window, there is no way, because who renders the button is the browser, and each browser renders a way, the only thing you can do is to style the input as the examples of links.
– LeAndrade
This question is not duplicate, I just edit and make my question more clear!!!!!
– wladyband
@Maniero I don’t know if you’re a moderator, but I’d like someone to remove from my top post of her by claiming that she’s a dub, because she’s not.
– wladyband
Note that even if the code changes slightly to your specific case, what characterizes the duplicate is the answer of the original being the solution to the problem, which is the case here. Anyway, duplicates are useful as indexers.
– Bacco
All right, I didn’t know that, thank you very much for the information.
– wladyband