Baseflow / flutter_cache_manager

Generic cache manager for flutter
https://baseflow.com
MIT License
749 stars 438 forks source link

File path is not the same as on Simulator #246

Closed mikeRozen closed 3 years ago

mikeRozen commented 3 years ago

🐛 Bug Report

Hi, I am downloading a Facebook profile image which works fine after that I would like to have the File (I would like to upload it to the Firebase Storage) using the same url from facebook

DefaultCacheManager().getSingleFile(url);

Inspecting the LocalFile I get I see somethimh strange: the path that I get is: /Users/myuse/Library/Developer/CoreSimulator/Devices/A5E8898B-4C35-4F89-BD91-A4FE771BF0D7/data/Containers/Data/Application/3D6B1A50-8A0A-4E92-94D1-21A7BECF02EC/Library/Caches/libCachedImageData/15c8ecf0-26a9-11eb-bbcb-d7f065956b72.jpg But when I try to open the path there is no such image i.e the path exists but the image name is different:

Screen Shot 2020-11-14 at 21 15 44

As you can see the image name is differ so as a result I cant upload the image. I deleted and reinstalled the app but still the same, I am not sure what I am doing wrong. Fetching the image form the gallery works

Expected behavior

Image name should be consistent

Reproduction steps

download image and get its File via url

Configuration

Version: 1.x

Platform:

renefloor commented 3 years ago

When the file is being redownloaded the file path changes. Maybe you did download the file a second time?