Skip to content

Instantly share code, notes, and snippets.

@Ndohjapan
Created May 16, 2021 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ndohjapan/25892d71f278a47d8a01605a44b9a777 to your computer and use it in GitHub Desktop.
Save Ndohjapan/25892d71f278a47d8a01605a44b9a777 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>File Upload</title>
</head>
<body>
<div class="container">
<h1>File Upload</h1>
<!--Create a form to send the file to a route "upload"-->
<!--Set the request method to POST-->
<!--Set the encytype to "multipart/form-data" in order to send files and not just text-->
<form action="/upload" method="POST" enctype="multipart/form-data">
<div class="file-field input-field">
<div class="btn grey">
<input type="file" name="myImage">
</div>
</div>
<button class="btn" type="submit">Submit</button>
</form>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment