nederlands
english
   
Uplpu demo support interface events scripts order  

Events

EVENT_SELECT
A file has been succesfully selected.
event
1
name The name of the file.
size The files size in bytes.
type The file type. e.g.:'.mp3'

EVENT_OPEN
Button 'upload' was pressed and the upload of the selected file begins..
event
2

EVENT_PROGRESS
The number of uploaded bytes have changed.
event
3
size Size of the file that is being uploaded.
done Number of bytes that has been uploaded.
pcn Percentage of the file size that has been uploaded
pgx Pixel size the progress indicator must be. Values are integers between 0...sizeOfProgressBar.
kbpsAverage Average upload speed in kilobytes per second with two decimal digits.
Formula: total bytes uploaded / total time elapsed.
kbpsCurrent Current upload speed in kilobytes per second with two decimal digits.
Formula: bytes uploaded from last progress event till this progress event / time interval between these two events.
timeElapsed Time elapsed since the upload started.
Format: h:ii:ss
timeRemains Estimated remaining time for the upload to complete.
Formula: (size - done) / (kbpsCurrent * 1000).
Format: h:ii:ss
  • The last four properties are updated every 250 milliseconds, in order to be readable.

EVENT_COMPLETE
The upload has been completed.
event
4

EVENT_RESPONSE
The server side receiving script outputs data.
event
5
data The data that has been output by the server side script.
  • Send on Windows but not on Macintosh, at least not on Mac OS X 10.2.8.

EVENT_STTBPS
The upload has finished and a new - Bytes per second - value has been measured.
event
6
sttbps A string of comma separated values of maximum five integers. These are the last five measured upload speeds in Bytes per second.
This event only occurs on Mac OS X before 10.3.
Read § Mac OS X about progress emulation, and how this event relates to parameter uplpu_initialize( sttBps ).

EVENT_CANCEL
The upload has been canceled by pressing the 'reset' button.
event
7

EVENT_S_HTTP
The upload failed and an http status code is returned from the server.
event
8
status The HTTP status code.

EVENT_E_SIZE
The selected file is greater than the maximum allowed size.
event
9
name The name of the file that is too big.
size The size of the file.
maxsize This is the same value as argument uplpu_initialize( maxSize ) where the maximum allowed file size is specified.

EVENT_E_INOUT
An in out error occurs.
event
10
text A string with an error code and possibly a short description.
  • e.g.: Trying to upload in https with a browser other than Internet Explorer, gives the following text: 'Error #2038'. Well, at least this is the case with self signed certificates. See § https about https support.

EVENT_E_SECURITY
A security error occurs.
event
11
text A string with an error code and possibly a short description.
  • e.g.: Trying to upload to a different domain without the rights is considered a security violation and sends this event with text: 'Error #2049'.
  • See § Cross Domain for uploading to different domains