flutter_cache_manager icon indicating copy to clipboard operation
flutter_cache_manager copied to clipboard

[Feature request] override extension file

Open jvinai opened this issue 1 year ago • 1 comments

I need to enforce a specific extension to the cached file whatever the MIME type of the file is.

It would be nice to have an option for that, for example:

var file = await DefaultCacheManager().getSingleFile(url, {extension: 'my'});

The end result with be a path with file:///somewhere/in/the/phone/myfile.my.

Thank you!

jvinai avatar Sep 07 '23 04:09 jvinai

I am facing same problem with FireStorage files, download files are stored in cache like this: image these files were mp4, but firebase adds signed key for viewing these files, so when saving these files its extension isn't based on mime type but requested url, if specifying its extension would solve this , then I'd be able load this file to video player.

abdushkur avatar Mar 31 '24 18:03 abdushkur