Store and retrieve photos locally?

Since I discovered that Thunkable apps store photos on the device whenever photos (from camera or album) are added to an app using the Media DB to upload to Cloudinary, I realized that I want one of two things:

  1. Photos stored in Cloudinary to save space on the device AND no photos stored on the device
  2. Photos stored on the device AND retrievable later

Maybe these are pipe dreams but… can I store the green Photo block from the Camera block in a stored list variable and then retrieve it later? I suppose I could just try it… looking for a little advice if anyone has any.

k… going to read this first:

@tatiang , it’s possible to base64 encode an image. I wonder if that would allow you to store it. (You’d need js in a webviewer to do the encoding…) Hmm. I’m going to play with that, since we didn’t get a WDC. :wink:

1 Like

Maybe yeah… and thanks for trying that!

I think the list of objects method may work but base64 might be a little less of a storage hog.

1 Like

This project appears to do that but it still requires Cloudinary which I’m trying to avoid:

Oh wait. I can’t do this with a Data Viewer List. It’s not going to take an image as an input. Darn.

This seems crazy but all I did was store the green Photo block value in an app variable initialized as an object with the blank property “photo” and then when I save the value to the local DB, I just get the property “photo” of that variable. And it works! What?!?!?!

1 Like