The OOB REST step with Save as attachment enabled fails when the file name has spaces. The REST call goes through MID server in this scenario.

 The REST step is running on MID server and when MID server tries to create attachment with the given name, the URI encoding does not work causing this issue. 

Steps to Reproduce

1. Configure REST step to run on MID
2. Check save response as attachment and enter a file name wirth spaces in it, ex: test 123.txt
3. Test and found the error
Invalid uri 'http://localhost:8080/api/now/v1/attachment/file?sysparm_mid_pool=&table_name=sys_user&table_sys_id=46d96f57a9fe198101947a9620895886&file_name=test 123.txt': Invalid query


Workaround for this issue is to replace the spaces in the filename with %20.

Related Problem: PRB1424519

Seen In

There is no data to report.

Intended Fix Version


Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-09-28 02:56:15