GETTING STARTED ATTACHMENT UPLOAD
PROGRESS TRACKING

If you want to track the progress of large file uploads then you need use a slightly different technique than used with standard ATTACH endpoint.

Note: if passing the sid - it must be in the URL querystring and not in the form. eg /ondemand/attach/progress/?sid=


STEP 1:

When the user triggers the "Upload" event in the user inferface, you need to call:

/ondemand/core/?method=CORE_ATTACHMENT_INITIALISE_PROGRESS

This will prepare the attach endpoint to track progress.

STEP 2:

Change the endpoint you POST to from /ondemand/attach/ to /ondemand/attach/progress


STEP 3:

To get the % complete for the upload then you need to poll:

/ondemand/core/?method=CORE_ATTACHMENT_PROGRESS_PERCENTAGE

It will automatically return for the last initialised upload (as done in step 1).  If you are doing multiple, then need to pass &progress=

eg for polling using Javascript, use setInterval() 

 

METHODS

CORE_ATTACHMENT_INITIALISE_PROGRESS

CORE_ATTACHMENT_PROGRESS_PERCENTAGE