Baseflow / Baseflow/flutter_cache_manager

error: FileSystemException: Cannot create file, path = '/data/user/0/com.example.myApp/cache/' (OS Error: Is a directory, errno = 21)

Open
#105 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
809
Forks
510
Avg merge
6m
Merged PRs (30d)
1

Description

Hi, thanks for the wonderful plugin i am using the cache manager andtrying to share an image from cache manager like so
```
try {
final ByteData bytes = await rootBundle.load(path);
await Share.file(
fileName, fileName, bytes.buffer.asUint8List(), 'image/png',
text: 'Shared from myApp');
} catch (e) {
print('error: $e');
}
```
i am getting the path from cache manager like
```
Future findCachedImagePath(String imageUrl) async {
var file = await DefaultCacheManager().getSingleFile(imageUrl);
return file.path;
}
```
and it returns to me this string
`/data/user/0/com.example.myApp/cache/libCachedImageData/e6cb8eb0-c1a7-11e9-8d36-096d03933f81.jpeg`

however on trying to share i get this error
`error: FileSystemException: Cannot create file, path = '/data/user/0/com.example.myApp/cache/' (OS Error: Is a directory, errno = 21)`

help would be appriciated, thanks
i am using the plugin esys_flutter_share

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported flow using DefaultCacheManager().getSingleFile and the Share.file call from the issue. Check whether the failure occurs in flutter_cache_manager or the esys_flutter_share integration; done means identifying the responsible component and documenting a reproducible fix or clear handoff.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.