Skip to content

Instantly share code, notes, and snippets.

@xpunch
Last active December 26, 2019 01:56
Show Gist options
  • Save xpunch/0b3de76412cc7ca41975853961a31c2b to your computer and use it in GitHub Desktop.
Save xpunch/0b3de76412cc7ca41975853961a31c2b to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<body>
<form method='post' enctype='multipart/form-data'>
<input type='file'>
<input type='submit'>
</form>
<form name="form" method="post" enctype='multipart/form-data'>
<input name='file' type='file' style='display:none;' onchange='document.form.name.value=this.files&&this.files.length?this.files[0].name:"No file chosen"' required>
<input type='button' value='Choose File' onclick='document.form.file.click()' />
<input name='name' type='text' value='No file chosen' readonly style='border:none;'/>
<input type='submit'>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment