[share_plus] temporary XFiles directory not cleaned #1299
Labels
documentation
Improvements or additions to documentation
share_plus
Feature, Enhancement, Bug Fixes for Share Plus Plugin
Platform
All
Plugin
share_plus
Version
>= 4.50
Flutter SDK
Any
Steps to reproduce
This is not really a ‘bug’ as in something is not working for the user, but as in undesirable behaviour.
Simply use
shareXFiles
without the files already having a path e.g. usingXFile.fromData
and experience your apps needed storage to increase by the filesize. While not having experienced this with share_plus, I used a similar approach for one of my apps lately. One would expect that the OS cleans up temporary storage - but it really does not until absolutely necessary, easily getting an app to a few GB.The offending code lives in
Future<List<XFile>> _getFiles(List<XFile> files)
, which is also why we refrained from providing the user with a way to pass raw bytes instead of handling a file himself before version 4.5.0.Code Sample
No response
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered: