fluttercandies / flutter_image_compress

flutter image compress
MIT License
642 stars 217 forks source link

[Bug report] compressAndGetFile leaves untracked leftover files in temp #321

Open quangduy-luong opened 1 week ago

quangduy-luong commented 1 week ago

Version

2.3.0

Platforms

dart, Android, iOS

Device Model

any

flutter info

[✓] Flutter (Channel stable, 3.24.3, on macOS 14.5 23F79 darwin-arm64, locale en-CZ)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.94.2)

How to reproduce?

When using the function compressAndGetFile, there is a new copy of the image generated in the temporary folder with a uuid name. It would be great if the plugin provided a way to autodelete these or returned the file path of these files so we can manage them, because compressing multiple images in the same session can bloat up the storage consumption of the app, and in many cases we need to clear files from it rather than relying on the system to free up space.

Logs

No response

Example code (optional)

No response

Contact

No response