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 theRecordId
.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
]
: Maximum of 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
-
startsWithCamera
(as of version 1.5.2)true | false
: Defines whether the upload is started directly from the camera or from the photo roll.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.