Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Save user images locally #1105

Open
raidenelite opened this issue Jan 23, 2022 · 2 comments
Open

Save user images locally #1105

raidenelite opened this issue Jan 23, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@raidenelite
Copy link

raidenelite commented Jan 23, 2022

Is your feature request related to a problem? Please describe.
Currently when users upload photos in the app via Library or take one via Camera they get moved into a cache folder for the app. This images get deleted if cache is cleared or device's changed.
Current paths
Android: file:///data/user/0/packagename/cache/ImagePicker/tempfilename.jpg
iOS: file:///var/mobile/Containers/Data/Application/package/Library/Caches/ImagePicker/tempfilename.jpg

Describe the solution you'd like
The images should be saved in a normal gallery folder or an app data folder (not cache), so apps can be made for offline use as well.
Also devs should have the ability to download images into this folder and delete them using paths.
This would allow apps to be used entirely offline, and have a backup option for the user to sync images between personal devices.

Describe alternatives you've considered
Cloud images force the user to have an internet connection. Also uploaded images (for user archive) would easily fill a cloud storage.

Other infos for context
The app i was thinking about would let the user upload a photo each day, this would be only for the user to view later on. I also wanted to provide a cloud backup if the user wanted. So that he could use the app and see images from different devices where he logged in. Still the user should be able to view the images even without a connection, so the sync would download the images on the user device and get the paths. To avoid keeping old photos, if an image got deleted from a device, the cloud sync on the second device should also delete the image.
As a similar example: whatsapp downloads the images on the device so user can see them offline, and provide the gdrive/icloud backup for restoring data.

Which platform are you asking for?
Thunkable ✕ (x.thunkable.com)

@jaredgibb
Copy link

jaredgibb commented Jan 26, 2022

Hey @raidenelite

So a couple things here! Thanks for bringing this up.

  1. We are working on a file to base64 string converter. This will allow a user to save images anywhere they'd like or even transmit them to a backend server via webAPI including other docs like pdf, .docx, etc.

  2. Have you tried saving images to a stored variable? You can save a list of images and use them that way.

Checkout this project
https://x.thunkable.com/projectPage/61cb3e036a10930010066592

@jaredgibb jaredgibb added the enhancement New feature or request label Jan 26, 2022
@raidenelite
Copy link
Author

Hello @jaredgibb

Number 1 would be great, just wonder about the size of a 3mb smartphone photo in base64. I hope it's gonna be available soon.

About number 2. Yes, and as i said in the original post, the photos get added in the cache folder. It happens exactly the same in your linked project. This raises the problems pointed out before. This is a temporary solution not a storage one.

Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants