05-15-2024, 05:11 PM
Hi alextweedly,
You can use the camera element and its low-code actions in the "camera" category to upload photos that have been taken or selected from the photo gallery of a mobile device.
To allow photos from the device's photo gallery to be used, turn on the "show photo gallery" property of the camera element. The low-code "camera captured" event can be added to the camera element to handle what happens when a photo is taken or selected from the photo gallery. For example, the camera element can be hidden after a photo is taken and the taken photo will be displayed for the user to view it.
When a photo has been taken or selected through the camera element, a temporary photo ID is generated. This ID is unique and represents each photo. The photo IDs can be retrieved with the "get captured photos" action or removed with the "clear captured photos" action.
The photo ID can be passed as an argument in the "display captured photo" action to display the photo in an image element and in the "save photos to database" action to upload the photo(s). The uploaded photos will be stored in the cdbBlobs table which can be viewed in Appli Builder's Data Viewer (Shift + D) whose icon is located in the footer. The low-code actions in the "blobs" category can be used to access or delete the photo from the database.
To link the uploaded photo(s) to a record in a table, the "output" argument of the "save photos to database" action can be used in conjunction with the "update record" action in the "database" category.
Tags, comments, or titles are not attached to the uploaded photos, but additional keys can be added to the cdbBlobs table to store these values.
You can use the camera element and its low-code actions in the "camera" category to upload photos that have been taken or selected from the photo gallery of a mobile device.
To allow photos from the device's photo gallery to be used, turn on the "show photo gallery" property of the camera element. The low-code "camera captured" event can be added to the camera element to handle what happens when a photo is taken or selected from the photo gallery. For example, the camera element can be hidden after a photo is taken and the taken photo will be displayed for the user to view it.
When a photo has been taken or selected through the camera element, a temporary photo ID is generated. This ID is unique and represents each photo. The photo IDs can be retrieved with the "get captured photos" action or removed with the "clear captured photos" action.
The photo ID can be passed as an argument in the "display captured photo" action to display the photo in an image element and in the "save photos to database" action to upload the photo(s). The uploaded photos will be stored in the cdbBlobs table which can be viewed in Appli Builder's Data Viewer (Shift + D) whose icon is located in the footer. The low-code actions in the "blobs" category can be used to access or delete the photo from the database.
To link the uploaded photo(s) to a record in a table, the "output" argument of the "save photos to database" action can be used in conjunction with the "update record" action in the "database" category.
Tags, comments, or titles are not attached to the uploaded photos, but additional keys can be added to the cdbBlobs table to store these values.