Comments should be their own data type
Pictures should be a list of images as a data field within the comment
Posts should have a data field that is “list of comments”
Load this list of comments into a repeating group underneath the post.
Load the list of images as a repeating group inside of the repeating group of comments.
If you really want to trick things out, add a draft mode so that you can auto-bind the comments and that way, automatically save and upload images as they’re selected.
Draft Mode Setup:
When a user taps the comment icon, run a conditional workflow that only triggers when current users draft_comment is empty
Draft_Comment = A single comment field located on the users profile data type
If users draft_comment is empty, the workflow will create a new comment.
Step 2 of this workflow is to show the input comment group.
The data type of this group is set to current users draft comment.
All input elements within this group can have auto-binding turned on. If the user accidentally closes your website, the contents of the comment will have been saved.
When the user clicks “share” you’ll run the workflow, “make changes to current user” and you’ll set the current users draft comment to empty.
Conversely, you’ll make a change to the parent groups comment. Even though the text and image content is already saved, you’ll still have to toggle a draft_mode field on the comment itself (just in case you want to allow users to edit comments later)
You’ll also want to assign a post to this comment and//or you can assign the comment to a list of comments as a data field underneath the post data type.