Add and manage files using file nodes in the config data model of a CDM app or in a component library.

Before you begin

Important: Starting with the Washington DC release, DevOps Config is being prepared for future deprecation. It will be hidden and no longer installed on new instances but will continue to be supported. For details, see the Deprecation Process [KB0867184] article in the Now Support Knowledge Base.

Role required: cdm_editor or cdm_admin

About this task

When you attach a file to an applicable node, a file node is created under that node. The file node contains a link to the attached file that stores configuration data. For example, a properties file or a logo image file.
  • In an app, you can add the file node to a node under the component, collection, or deployable folder. The file nodes in a component are also included when you include a component to a collection and the collection to the deployable in an app. You can override the file nodes included at the collection or deployable level, like any other config data item.
  • In a component library, you can add a file node to a node under a shared component. When the shared component is used in an app, the file nodes are copied along with the file attached to them.
App developers and members of the authoring group of the app can access the file nodes and also download their attached files. They can manually validate the content of the file and then publish the snapshot. DevOps users can export the validated config data, including file nodes with URLs to the attached files hosted on the ServiceNow instance where the export was executed.

Procedure

  1. Navigate to All > DevOps Config > DevOps Config Workspace.
  2. Open a DevOps Config app or a component library to add a file node to its config data model.
    OptionSteps
    Adding a file node in an app
    1. Select the apps icon (DevOps Config apps icon) in the left navigation pane.
    2. Select an app from the Applications list.
    3. Select Edit config data to open a changeset.
    Adding a file node in a component library
    1. Select the component libraries icon (Component libraries icon.) in the left navigation pane.
    2. Select a component library to open or create one.
    3. Select Edit to open a changeset.
    A changeset is opened with the Config data tab selected.
  3. In the config data tree, select the more actions icon (More actions icon.) next to a node to which you want to add a file node, and then select the Add file from the menu.
    Note: In an app, you can add a file node to a node under the component, collection, or deployable, but not directly to the component, collection, or deployment folder in an app. In a shared library, you can add a file node to a node under a shared component.
  4. Add a file to create a file node.
    1. In the Add file dialog box, browse and select a file from your system, and select Add file.
      You can add a MIME-type file supported by the ServiceNow AI Platform with a maximum file size of 5 MB.
    2. In the Node name field, provide a name for the file node.
      By default, the attached file name is populated as the file node name. The Content type field is also populated with the content type of the attached file.
    3. Select Add file.
    The file node is added to the selected node. Select the file node in the config data tree to display its metadata in the File information pane and preview the file's content in the File content pane.
    Note: The content preview is available for the files with the following MIME types: text/yaml,text/css,text/csv,text/html,text/javascript,text/plain,text/richtext,text/x-vcard,text/x-vcalendar,application/xml,application/javascript,application/json. To view content for additional MIME type files, add them as a comma separated list to the system property sn_cdm.attachment.display_mime_types. The preview is not available for binary file MIME types, such as audio, image, and video.

    A file node added to a component node.

  5. (Optional) After the file node is added to the config data, you can perform the following actions on the file node or the file attachment within it.
    Note: All actions on the file node or its file attachment can only be done via the More actions menu on the file node.