May 2019
Intermediate to advanced
478 pages
11h 21m
English
When an HTML form includes file uploads, the browser uses a different content type. In this case, Content-Type: multipart/form-data is used. When Content-Type: multipart/form-data is used, a boundary specifier is included. This boundary is a special delimiter, set by the sender, which separates parts of the submitted form data.
Consider the following HTML form:
<form method="post" enctype="multipart/form-data" action="/submit.php"> <input name="name" type="text"><br> <input name="comment" type="text"><br> <input name="file" type="file"><br> <input type="submit" value="submit"></form>
If the user navigates to a web page bearing the HTML form from the preceding code, and enters the name Alice, the comment Well Done!, and selects ...
Read now
Unlock full access