Cannot upload/encrypt and download/decrypt an attachment via REST through the Edge Encryption proxy.


Steps to Reproduce


  1. Log in as admin in any current release.

  2. Activate the Edge Encryption plugin.

  3. Set up a proxy pointing to the instance.

  4. On the Service Portal, open a session using the Edge Encryption proxy.

    Note that you can add attachments. Also, the generated [sys_attachment] records are not encrypted, and can be accessed in a session not using the Edge Encryption proxy.

  5. Create an Incident record invoking a preprogrammed REST API (JS or C#NET) with a POST action and JSON format towards the Incident table.

    Note that the call is unsuccessful and throws a Gateway Timeout error. The REST API call with the GET action to the Incident table might be successful and return records.



This is expected behavior in the current releases, and has been identified as a possible future product enhancement.

The workaround is to use POST requests to sys_attachment.do for REST attachments.

Headers needed: Content-Type and Authorization

Cookies needed: glide_user, glide_user_session, jsessionid

For example, your Cookie section should look like this example:

glide_user=<yourGlideUser>; glide_user_route=<yourGlideUserRoute>; JSESSIONID=<yourJsessionID>;

Content of the POST

The content of the POST should be in the format:

Content-Type: multipart/form-data; boundary=---------------------------12296202189918688451571609901
Content-Length: 56332
Content-Disposition: form-data; name="sysparm_ck"
Content-Disposition: form-data; name="sysparm_sys_id"
Content-Disposition: form-data; name="sysparm_table"
Content-Disposition: form-data; name="attachFile"; filename="myFile.txt"
Content-Type: text/xml


Related Problem: PRB1164901

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-03-15 15:11:44