SQL image storage?

From the link above, I am trying to understand the following paragraph:

Each image or file is saved as a separate row in a database table. Instead of a table, you can use an updateable view. You need a varchar(max) column which can hold the content (in base-64 encoded text format). You also need a column (at least nvarchar(256)) to hold a unique text “label” that is used to identify and retrieve the image. AppSheet will only read and write these columns. Any other columns in the database table should therefore be nullable.

I have a postgresql database running on Google Cloud. I have a table setup as described above (not an updateable view). If I have a column to store the data (“col_data”) and a column to store the label (“col_label”), from the app in data > columns > my_table, how do I tell it that the data for col_label is stored in col_data? or am I completely missing what the paragraph is trying to say?

If there is an easier way to do this or a way that anyone knows that works, please let me know. Thank you!


Hi @EIG. When you go to Account > Integrations > Store, you should be prompted with a dialog to configure the columns of your image store:

That’s where you should specify the label column name and content column name.


Thank you @tony! That really helped. That was the missing piece. I need to fully test it but it seems to be working now for one picture. Not sure yet how to handle multiple files and pictures in one table but will keep working on that.

Just to add to Tony’s answer above, in case anyone with this same questions comes across this post. After you create this store, you will need to update the table Store.

I think this is where the updateable view comes in, the data store is a separate table/view that stores images and files for all of the other tables.

1 Like

I just want to keep adding to this post because I struggled with this and if someone else finds this, this will help them.

There are two ways to store images. The way mentioned above, through creating a table and storing data in the table, or creating Storage Bucket. This is specific to Google Cloud. I would recommend the Storage Bucket because the pictures are more easily accessible. This is a good guide:

1 Like