-
Notifications
You must be signed in to change notification settings - Fork 665
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
Support custom disk cache file naming strategies #1920
Comments
I think this is best handled by adding a |
I don't see anything like that, |
Sorry, I was proposing a potential API as this doesn't exist yet. After thinking about this more we'd have to be careful adding this API as changing the |
Workaround: val uri = context.imageLoader.diskCache?.openSnapshot("https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png")?.use { snapshot ->
val newFile = File.createTempFile("shareImage", ".png", File(context.cacheDir, "/image_cache"))
snapshot.data.toFile().copyTo(newFile, true)
FileProvider.getUriForFile(context, "pl.vemu.zsme.fileprovider", newFile)
} |
Any progress in adding |
Is your feature request related to a problem? Please describe.
Thumbnail in share intent must have an image extension, otherwise it's not shown.
Code sample
When I change
snapshot.data.toFile()
to a file, which is in the same directory, but has.png
extension, everything works fine.Describe the solution you'd like
Add option in ImageLoader.Builder to preserve image extension in DiskCache.
The text was updated successfully, but these errors were encountered: