I want to have a HTTP POST to a PHP script which includes a file upload. The PHP script should reject any file which is not the right type, or otherwise malformed.
This means
- the PHP script begins executing before the upload is complete,
- it reads the first X bytes of the file, and
- maybe abort the connection before upload is complete.
How do I do each of these?