I find the default HTML file upload button rather ugly. Annoying enough, there seems to be no way to style it directly. Here is how I created a cus...
For further actions, you may consider blocking this person and/or reporting abuse
You can style the button with
input::-webkit-file-upload-button
. You can check the docsInteresting. Never knew about that. Thanks for sharing, Derek.
But it wont hide the "no file chosen label
@davebudah I think you can set the blank string to span with id
file-chosen
Thanks man
I have checked the docs not much browser support
Your exlanations and demos are very clear and of course very useful.
You succeeded to cover the whole subject.
I used your idea in my code.
You helped me very much!
This is nice solution but you can't focus "button" with keyboard.
I used something like this to make focus working:
<input style="display:none" type="file" id="my-file">
<button type="button" onclick="document.getElementById('my-file').click()">Choose file\</button>
Hi Faddal
Thank you for your code. I am new to trying to make an upload button work.
Can you please advise what the code would be to finish off the process, eg the file is selected, can you please let me know what the code is to actually submit/upload the file.
Does it need another button to press submit, and can you please also advise where the file is uploaded to, can I create another folder on the server that the uploaded files go into. Will it let the person know who is uploading the file that their file was uploaded successfully?
I would be most grateful if you could help me understand what code I need to have to get the file actually uploaded and where it is uploaded to.
Many thanks for your help in advance
was helpful. thanks
thanks man
The easier way I found, thank you Faddal.
Thank you very much.
This is quite helpful
Nice post @faddalibrahim , I like the options this give me :)
Thanks @bugs_bunny too, TIL :)
How you direct upload button to a folder to put files
Thanks this was super helpful
saved my time š„°