Store images and retrieve bulk images on mobile with Database?

Hi,

I'm building a mobile app with a Retool database as main datasource.
I'm storing items into a table sku, and for each item I store an image taken with the mobile image input.

The image is stored into a S3 bucket because it seemed like the easiest way, but it doesn't seem very practical (or I don't really know how to do).

The main issue is retrieving the images for a list of skus I retrieve from the a database query like SELECT * from sku. it would be great have a way of storing or retrieving all the images as well in order to display the image in a collection list component with the image.
Any idea on how to design this ?

I thought of building a workflow to make requests to S3 to retrieve the image for each but it seemed a bit overkill and I'm concerned it would slow down the app.

IMO the most convenient would be a way of storing this inside retool but I didn't find how :sweat_smile:

Otherwise I feel like I could store the amazon S3 bucket file image link in the database, but I don't find any link on the amazon S3 bucket file that would let this possible.

Any help would be appreciated, thanks in advance !

1 Like

A common way to do this is to host all your images in an S3 bucket and then just access the images by URL. Retool Mobile's Image component will support any image URL. Your implementation may depend on whether you know the URLs beforehand or need to query the S3 API to find them. It will also be more complex if you want to control who can access the images (anyone vs specific people).

This may help: asp.net - How to get the public URL of the image from AWS s3? - Stack Overflow

To test if the URLs work, just paste the URL into your browser on your phone. If it successfully loads an image, then you're good to go.

The thing you're Googling for here is something along the lines of "How do I serve images in an S3 bucket to the public internet".

working great thanks !

I had to set a few policies following this article : How to Serve Images from Amazon S3 in 4 Steps

1 Like