Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Users upload photos.
#1

I have an app which needs the user to be able to upload their own photographs (ideally with tags / comments / titles / ...)

I kind of guess there is some way, and I've just missed it.  If so, could someone point me to the docs that describe it.

If not - please make it a (high-ish priority) feature request.

(How am I ever going to replace tripadvisor without this feature :-)
Reply
#2

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.
Reply
#3

Thanks Linda.
How do I upload photos form a non-mobile device (e.g. my Mac) ?

Can I drag / drop photos somehow ?
Reply
#4

The "create blob" action in the "blobs" category can be used to upload photos from a non-mobile device. The "blobID" argument of the action refers to the "cdbRecordID" key of the "cdbBlobs" table.

Drag-and-drop to upload photos is not currently supported.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)