The two attributes method="post" and enctype="multipart/form-data" on the <form> element are mandatory. Likewise, there must be at least one <input type="file"> element with a proper name attribute. Finally, some way to submit the form, e.g. the <button type="submit"> element, is required. The hidden input named MAX_FILE_SIZE is an optional hint for the client. Note: By default, a set of filename extensions is used that is relatively safe for PHP applications and common on the web. This may be sufficient for some use cases.