zetbaitsu / Compressor

An android image compression library.
7.09k stars 963 forks source link

Ability to delete cached image. #196

Open Normalnick12 opened 2 years ago

Normalnick12 commented 2 years ago

Hi @zetbaitsu! Thank you for library. My question is how can we safely remove the cached file from the compressor folder? For example, I get images from outside, create a new file with name compressedImage , and set destination(imageFile) as the property, my newly created file is successfully replaced with the compressed one. But now we have 2 identical files in different folders. Would like to be able to properly delete a file coming along the path - "${context.cacheDir.path}${separator}compressor$separator".

wangzai0904 commented 2 years ago

Hi @zetbaitsu! Thank you for library. My question is how can we safely remove the cached file from the compressor folder? For example, I get images from outside, create a new file with name compressedImage , and set destination(imageFile) as the property, my newly created file is successfully replaced with the compressed one. But now we have 2 identical files in different folders. Would like to be able to properly delete a file coming along the path - "${context.cacheDir.path}${separator}compressor$separator".

You can manually delete all files in the compress directory located under the app's cache directory