Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
REST step save as attachment fails when File name has spaces, running on MID - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • REST step save as attachment fails when File name has spaces, running on MID
KB0855983

REST step save as attachment fails when File name has spaces, running on MID


1154 Views Last updated : Dec 27, 2023 public Copy Permalink
KB Summary by Now Assist

Description

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

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


Related Problem: PRB1424519

Potentially Seen In

There is no data to report.

Fixed In

Quebec

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.