Receiving and storing pictures

Friends, I ask for collective help - I just don’t know what to do.

There is an application that stores user data in a Google spreadsheet (username, city, phone number, etc.). You need to add the functionality of adding a user photo to the application.
The question immediately arises:

  1. Where to store the received photos?
    If you know the answer to this question - please tell me in as much detail as possible, at the “For dummies” level :slight_smile:
  2. How to split the storage of received photos in relation to the user? Those. user 1 - his photo is like this. And user 2 - his photo is like this.

Thanks in advance for your collective help. My brain is boiling.

Please do not ask why user data is now stored in a Google spreadsheet. Made due to lack of experience, but redoing it will be very long and very difficult.

As an option - to implement the storage of photos on an FTP server. But just a question:
How to upload photos to the server? I don’t represent it at all.

1 Like

I

instead of an answer I have a question. Is it a requirement of the project to store the photos locally? If not you simply need to reference the cell in which the image lives. This should return a URL that represents the image. This solution assumes the image already lives inside of the Google sheet.

Alternatively, you can upload the user image to cloudinary and then save the URL returned from cloudinary to Google sheets using the camera and mediaDB blocks. This will return a URL that represents the uploaded image and you can use the URL instead of a file to set an image

3 Likes

Hello @lavrynenko
The profile picture is now regarded as the standard in nearly all apps and when I think of building an app that stores users’ profile, I would like to include the picture.

One easy way is to use the cloudinary component in Thunkable to upload the picture of the user and obtain the URL from the cloudinary Media DB component. Store the URL in your Data source so you can always retrieve it to display it in your screen.

Should you do not want to use the cloudinary then you have other options which would require extra programming to achieve it.

Personally, I use Firebase Storage to save pictures and other files.

See this sample photo

https://firebasestorage.googleapis.com/v0/b/sample-structure-9d875.appspot.com/o/remote-control.png?alt=media&token=2a9c7d37-649d-47af-bd7b-2bf4f807fa1b
3 Likes

Interesting!
It remains to understand how to implement all this in cloudinary… :slight_smile:

As far as I understand from your example - we are talking about a picture. Is it possible with the method you described to implement:

  1. Uploading a photo from the user’s device
  2. Getting the URL of the uploaded image
    ?
1 Like

Yes,
I just made a sample demo for another member to read the file from user’s device and convert it to Base64 string.

See the demo in this post

This is another demo to save Canvas image to Google drive
https://x.thunkable.com/projectPage/618cfa678cdb0f0011998dbe

1 Like

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