Tsallaka zuwa abun ciki
Justice Tech School

File Upload

type="file" lets users choose files. Set the form enctype to multipart/form-data and method post. accept filters file types and multiple allows several files.

Example
<form method="post" enctype="multipart/form-data">
  <input type="file" name="photo" accept="image/*">
  <button>Upload</button>
</form>

Exercise

Allow several files.

<input type="file" >

Quiz Test

Which enctype is needed for uploads?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.