I am using version 5.4.2 and try to create image post with text using PostRepository.createPost.
the creation is successful but the returned post object have no images records.
here is message log in the websocket channel. Uploading 2 images with text.
Could you please share the snippet of code from your side for further investigation?
From what I can see from the screenshot, the data field should have text field but somehow yours shows as postText. I did a test from my side and it shows like this
Besides, the statement of “return only 1 image instead of 2 images”, as you can identify from the fileID, the image returned is not the ones you uploaded. That is the community avatar since you created the post into that community.
And if things work correctly, it should return like this, with postChildren inside (each image will be rendered as a child post):
The problem is that you’re using a custom dataType post which is “POST_DATA_TYPE” (user.post) and therefore our backend does not take care of the attachment payload, for that custom posts are entirely up to you to build.
The attachments array would only work for platform’s native posts, for which the payload should be: