It is defined by the client when it creates a POST request. Files can only be present with the body multipart / form-data , which looks like this:
--BoUnDaRy02984
Content-Disposition: form-data; name="textfield1"
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Joe owes =80100.
--BoUnDaRy02984
Content-Disposition: form-data; name="file2"; filename="C:\tmp\file.doc"
Content-Type: application/ms-word
Content-Transfer-Encoding: base64
Content-Length: 32
VGhpcyB3b3VsZCBiZSB0aGUgdGV4dAo=
--BoUnDaRy02984
PHP does not interpret all possible multipart / options, but detects file downloads using the attribute filename=and uses the field Content-Type:verbatim for $ _FILES [*] [type].
mario source
share