Viewing post content
Post with images or files follow Parent - Child relationship. Each uploaded image/file will be a separate child post. Any text that you set while creating an image/file post will act as a Parent post. Parent post contains childrenPosts
property which gives you an array of AmityPost
.
Viewing Image from post
To get an image URL:
Calling getUrl() without specifying image size returns a URL of a medium-size image. Use the appropriate image size depending on your use-case to save bandwidth.
SMALL is used for image thumbnails, with a maximum image size of 160 pixels per dimension. For example, this should be used for small previews in an image gallery that displays a large number of images in a grid.
MEDIUM is used for standard image display, with a maximum image size of 600 pixels per dimension.
LARGE is used for full-screen image display, with a maximum image size of 1500 pixels per dimension.
FULL is used to get the original image. This size is only valid if the image is uploaded with the method isFullImage() set to true. If a FULL sized image is not available, a LARGE sized image will be returned instead.
Render image with Glide
To render image with Picasso
Viewing file from post
To get file URL and file name:
Last updated