Harness and Section forms - Adding an Attach Content control

Application users can attach files to a desktop or an offline-enabled application by using the Attach Content control (pxAttachContent).

Users can add files to an application by using either the file browser or drag and drop functionality. You can customize this control to be displayed as a button, link, or icon.

Using this control at run time in a desktop application opens the default file browser window from which users can attach files to their application.

Using this control at run time in a Pega Client for Windows-based application, when a camera is present in the device, opens a selection dialog box with two options. Users can choose to open the native file picker component to attach files to their application or open a live camera view of which they can take a snapshot. When a user takes a picture, the control creates a file with a timestamp-based file name and attaches the file to the application. If no camera is available, the control opens the native file picker component without displaying the selection dialog box.

On a mobile device, users can select content from the built-in image, video, or audio gallery, as well as any type of attachment from any other source that is available in the device's native file picker component. In addition, you can configure compression parameters to limit the size of files created on a mobile device.

  1. Add a control from the Basic menu to a section or layout.

  2. Click the View properties icon for the control to open the Cell Properties window.

  3. Next to the control name, click Change and select Attachments.

  4. Optional: On the General tab, configure the following settings:
    • Display options for the control

    • Attachment compression parameters for mobile apps

  5. Click Submit to save the changes to the control.

The Attach Content control is also supported in offline-enabled applications. For more information, see Attach content support in offline mode.

Note: For more information about the Attach Content control, see Using the Attach Content control on Pega Community.