View Full Version : enctype in html form

08-12-2005, 07:35 AM

Some book say when we upload file to the database we should use "multipart/form-data" why not "application-x-www-form-urlencoded" ???

Thanks for your help.

08-12-2005, 04:36 PM
The media-type multipart/form-data follows the rules of all multipart
MIME data streams as outlined in [RFC 2046]. In forms, there are a
series of fields to be supplied by the user who fills out the form.
Each field has a name. Within a given form, the names are unique.

"multipart/form-data" contains a series of parts. Each part is
expected to contain a content-disposition header [RFC 2183] where the
disposition type is "form-data", and where the disposition contains
an (additional) parameter of "name", where the value of that
parameter is the original field name in the form.

application-x-www-form-urlencoded is inefficient for LARGE file uploads, because it increases file size to urlencode every byte. This can double or triple the file size.

More info:

08-13-2005, 05:52 AM