External collection of images and database SQL

I just need to have my images that users send to the app in an external database.
I saw i can create a database with SQL but i would like to know how to link this database to adalo. I saw there is something with and API REST and would like to know if you guys know how i can do ??

I only need to fix this and my app will be finish !
Thank you for your help !

You want to store the image files or just the URL to the image?

Honestly I don’t really know what would be the difference between this two options. I juste want it to work like the actual database. So when the users open the chatroom he can see the previous messages and the images he sent.

:point_up: This is what you need.

Note - images uploaded via adalo image picker are stored by Adalo. The image picker returns a URL of the image, you can reference this in your external collection. The image file will persist on Adalo’s servers.

You can also do what you describe in Adalo collections alone. Read up about relationships or find a messaging app template and see how collections and relationships are setup.

Thank you for the info. The problem is the images users are going to send are sensitive data and need to be on external database which are more protected. Is there a way the images don’t stay in the adalo servers ? Because if they stay on the adalo server it’s useless to create an external database. Correct me if I’m wrong I can be misunderstanding what you said by stay on adalo server.

You are correct. Any adalo stored image or file is accessible to anybody with the link, it is not secure. But then what are the chances of that link being shared? It depends on the sensitivity of the data ultimately.

For absolute security you cannot use the image picker or file uploader. You will need to put the image in a database or bucket storage yourself with proper auth to access it, via a 3rd party service or a custom component for Adalo.

I see the point. It seems to be pretty complicated.
I had an idea, The image picker returns a URL of the image and I can reference this in my external collection. You said The image file will persist on Adalo’s servers but if I delete one or two minute after the URL from the Adalo database but not from my external collection. Then the users will still be able to see the image ?

If you delete the record referencing the image from the Adalo database the image will still exist on Adalo’s servers, they are not deleted. If you aren’t referencing the image in your database directly then they won’t easily be able to see it, but it’s still there in the cloud.

Ok so, is it possible to display images without the image picker / file uploader ?

Yes. Just use the URL option in the image component.

Options are:

But, how the user can select or take a picture from his phone with only the image component ? I understood that I can display the image with the url but I don’t see how he can choose his images.

I’m losing the thread here a bit, but try to summarise your options.

Via the Image Picker or an Adalo Form you must then create a record in the database. The image will be stored in Adalo Cloud and served by Imgix (Another topic). There is no security in this aspect, the image URL can be loaded by anybody without authentication.

  • even if you don’t submit that record to the database the image will persist in the cloud
  • if the record in the database is later deleted, the image will persist in the cloud

You can then display the image in your app by referencing the Adalo Database field that stores the image object, or via URL if you wish.

If you want privacy surrounding the images that users upload, you cannot use an adalo component, you need a 3rd party component, uploading to your own cloud provider with authentication inplace. This is complex, you need to work with somebody to implement it. @theadaloguy has a API webview solution for uploading images to S3, and you could potentially extend it with your own security.

Once the image is in your cloud you can display that in your app with the normal image component, referencing the URL, which will have to include some auth parameters.

The questions I would ask are,

  • How secure do these images need to be?
  • Is the random but constant URL generated by Adalo an acceptable solution? Since nobody will guess it and it likely can’t be reverse engineered
  • Does it really matter that the images will persist in the cloud?

I hope this is understandable, it’s is far from straightforward.

1 Like

Yes it’s was very clear thanks, This data is about health so this need to be on HDS certified servers so it’s better if this don’t stay in the adalo cloud and if I don’t want any problems unfortunately even if I’m sure adalo have protected data.

I think I will try to see if @theadaloguy can respond to this criteria that I need to follow.

Big thanks to you and for your time.

You are welcome.
I would look hard at where your data is going with Adalo, in my opinion it is not suitable for a level of data security as required for personal health care.

Xano offers HIPPA compliance but then your API calls from your Adalo app are not direct to Xano from the user’s device, in recent tests mine go via an amazon datacenter in Virginia.

In other news, I just read that Xano raised $10m in a recent funding round. :clap:

1 Like

Hello @Rozza i’m back for a question :slight_smile:
I took the adalify component so now the pictures my users send are directly on my amazon S3 bucket :partying_face:
So, this is perfectly working for the storage but i’m struggling to show the image in the chatroom. When a user click to send an image, the url is sent to amazon S3 but i don’t know how i could display the image when the user is sending it. Here is a picture of what it looks like

I thought to add a create message when i click on OK but don"t really saw how this could work.
If you have any idea i take it :slight_smile:

Hi @Clement1
Glad you are on the right track.

I think those images in the chat list should be coming from the chat collection. At the moment they appear to come form Logged in user > fileurl.

Failing that…
This is really a bit bespoke so would suggest a call. I would suggest @theadaloguy over myself. It is his product, so best suited to help. If you can’t, then book a slot with me. :+1:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.