Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store images to cache folder #98

Open
alihabbash opened this issue Nov 14, 2018 · 3 comments
Open

Store images to cache folder #98

alihabbash opened this issue Nov 14, 2018 · 3 comments

Comments

@alihabbash
Copy link

alihabbash commented Nov 14, 2018

How can I store images to the cache dir?
I tried to set the file path to cachedir but it store the copies to

/sdcard/data/user/0/com.ramiissa.dubaiing/cache

Also, how can I provide a static name for all created copies so, when a new copy is created the old one will be overwritten

@miguelbcr
Copy link
Owner

Hi @alihabbash !
You should use useInternalStorage(), calling it the images will be saved in internal storage, otherwise in public storage

how can I provide a static name for all created copies so, when a new copy is created the old one will be overwritten

Right now the files are renamed using a date-time format ("yyyyMMdd_HHmm_ssSSS"), for instance, as Whatsapp does, in order to avoid duplicated names when processing several time at one shot

@cirnoftw
Copy link

cirnoftw commented Feb 11, 2019

What about sdcard cache directories, like from getExternalCacheDir()?
Would be great to have an option to specify cache directory in the builder instead of defining it explicitly.

@miguelbcr
Copy link
Owner

@cirnoftw I can't remember it clearly, but I guess we added setUseInternalStorage(boolean) option in order to make the API simplier and less error prone because getExternalCacheDir() could be not available since it is a removable media and could be ejected by the user but I could give it a thought.

Thanks for your suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants