.png?fit=max&auto=format&n=UDnqA5TqR2qMKTU8&q=85&s=0cc47f16e470be879373b4a952b620e1)
places that has a pictures field which is an array of strings containing the file name of files stored on a s3 bucket.
In a smart field called s3pictures I return the value of calls made to S3 to get signed urls for the files whose name is present in the pictures field.
Implementation
First you need to implement the function to get the signed urls from s3. We use theaws-sdk npm package to connect to the bucket storing the pictures.
services/s3-helper.js
s3Pictures smart field and implement the get logic to populate it. In the get function you iterate on the pictures array to get the signed url for each file name then return an array with the signed urls.
forest/places.js