Issue
- Example filename
https://****api/v1/CreatAttachment?table_name=sn_customerservice_case&table_sys_id=xxxxxxxx&file_name=yyyyy[zzzzz].png
- if the filename contains "[" and "]" , then API fails to post the attachments, but if the name of the filename is simple then it works perfectly fine.
- Error Messages :
trax BR inc2.2: Error executing REST request: Invalid uri
and
Invalid query
Cause
- The square brackets ( [zzzzz] ) are not escaped and so the filename is not correct.
Resolution
- Solutions are to either escape the square brackets or use URL encoding
e.g.
Changed
file_name=yyyyy[zzzzz].png'
to
file_name=yyyyy%5Bzzzzz%5D.png'