PHP 5.2 has a new set of hooks for checking the progress of a file upload

A familiar upload form
<form enctype="multipart/form-data" action="upload.php" method="POST">
  <input type="hidden" name="UPLOAD_PROGRESS" value="key"/>
  <input type="file" name="file1"/><br/>
  <input type="file" name="file2"/><br/>
  <input type="text" name="desc"/><br/>
  <input type="submit" value="Upload!"/>
 </form>
Events
START:      content_length = 22962

FORMDATA:   post_bytes_processed=5245
            name=UPLOAD_PROGRESS
            value=key
            length=3

FILE_START: post_bytes_processed=5245
            name=file1
            filename=animated_elephant.gif

FILE_DATA:  post_bytes_processed=5414

FILE_DATA:  post_bytes_processed=10533

FILE_DATA:  post_bytes_processed=15652

FILE_DATA:  post_bytes_processed=20771

FILE_DATA:  post_bytes_processed=22962

FILE_END:   post_bytes_processed=22962
            temp_filename=/var/tmp/php8301YZ
            cancel_upload=0

FILE_START: post_bytes_processed=22962
            name=file2
            filename=abstract.txt

FILE_DATA:  post_bytes_processed=22962

FILE_END:   post_bytes_processed=22962
            temp_filename=/var/tmp/phpNcGVyl
            cancel_upload=0

FORMDATA:   post_bytes_processed=22962
            name=desc
            value=Text Field
            length=10

EVENT_END:  post_bytes_processed=22962
cancel_upload codes
#define UPLOAD_ERROR_OK   0  /* File upload succesful */
#define UPLOAD_ERROR_A    1  /* Uploaded file exceeded upload_max_filesize */
#define UPLOAD_ERROR_B    2  /* Uploaded file exceeded MAX_FILE_SIZE */
#define UPLOAD_ERROR_C    3  /* Partially uploaded */
#define UPLOAD_ERROR_D    4  /* No file uploaded */
#define UPLOAD_ERROR_E    6  /* Missing /tmp or similar directory */
#define UPLOAD_ERROR_F    7  /* Failed to write file to disk */
#define UPLOAD_ERROR_X    8  /* File upload stopped by extension */