PhotoUploadAction

You can define that users can upload photos (e.g. taken with the device) by assigning this action template.

Below is a list of input arguments:

Input Argument

Description

Config

See Config Input Argument

Action

uploadPhoto (fixed value)

saveToCameraRoll

If set to false, photos taken with the CRM.pad photo upload are not automatically stored in the iPad camera roll.

This input argument is not included in the default configuration. If needed, add it to your configuration.

Config Input Argument

Define the options for the photo upload in JSON syntax:

  • compression: The JPEG compression rate. A float value between 0 (bad quality) and 1 (best quality).

    Default: 0.8

  • fileNamePattern: File name, use the %1 placeholder for the RecordId.

    Default: photo.jpg.

  • textPattern: The options for the selected size. You can use the following placeholders:
    • %1: Contains the file name
    • %2: Width in pixel
    • %3: Height in pixel
    • %4: File size

    Default: %1 (%2 * %3, %4)

  • sizes (int array): Determines the image side that is larger. This value is used to scale the image. The user can select the desired size when uploading the picture.

    Default: [320 ,640,1280,0 ]: Max. four values possible:

    • 320: the longer side is scaled to 320 pixel if larger
    • 640: the longer side is scaled to 640 pixel if larger
    • 1280: the longer side is scaled to 1280 pixel if larger
    • 0: the current size is applied.
  • skipOne true|false: Defines whether the selected size can be exceeded, if only one option is available.

    Default: false

  • imageNameEditable true | false: Defines whether the user can enter in the image's name.

    Default: false

Example:

{"compression": 0.8, "sizes": [320 ,640,1280,0 ], "fileNamePattern": "photo.jpg", "skipOne": false, "textPattern": "%1 (%2 * %3, %4)", "imageNameEditable": false}

If you do not enter a JSON script, default values are applied.