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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.