HTTP Resource Upload

Purpose

This method enables the Interaction Server client to upload a file to be attached as data for a specific Element (according to its id) inside the current Object-Step. For example, what the Interaction Server client must perform when interacting with the Interaction-Page elements, which is a button for image upload called imageUploadButton.

URI Syntax and Example

http://[host:port]Application Name/version/[version]/account/[accountID]/[object]/[Object-Id]/[Object-Instance-Id]/[elementID]

http://api.Interact.jacada.com/version/1/account/12345678/interaction/ABC1234567/1337088343163-840/res32q8-9939

HTTP Method

POST

tog_minusRequest Headers

The HTTP Resource Upload request header fields are as follows:

Field Name

Data Type

Description

Content-Disposition

string

Describes the context and the resource name to be uploaded. For more information  refer to http://www.ietf.org/rfc/rfc1867.txt.

Content-Transfer-Encoding

string

Describes the encoding used by the data stream for uploading the file contents.

Content-Length

8-bit byte

The file content with respect to the Content-Transfer-Encoding.

Local-Cache-Path

string

The resource file location inside the Interact-Client sandbox. The location is used when the Server sends pages or objects referring to that resource.

For example, a picture which is uploaded at a certain interaction page, and then later previewed in other pages.

tog_minusRequest Example

An HTTP Resource Upload request example for an image upload is as follows:

POST /version/1/account/12345678/interaction/ABC1234567/1337063-840/res32q8-9939 HTTP/1.1        

Content-Type: image/png

Host: api.Interact.jacada.com

Content-disposition: attachment; filename="file2.png"

Content-Transfer-Encoding: binary

File-Local-Address:"file://basepath/383381038382"

Response
HTTP_CREATED 201 / HTTP_OK 200