You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Return the path to the compressed cache file instead of the Uint8List. At the moment, the compression creates a File in the cache directory and only returns the bytes. There is no way to use the file that has been created in the cache directory by the compression method.
Why
Returning only the bytes of the compressed images forces the user to hold all the bytes in memory or save them as duplicates so we can store a path instead of holding them in memory.
In both scenarios, the file is a duplicate because the compression itself already created a file in the cache folder.
This is important if we compress multiple files. The current workflow:
-> Select Images
-> Compress
-> Wait for the user to confirm compression and save to the device.
These lead to duplicate files and unnecessary storage usage if we don't want to hold the files in memory. To avoid the high memory usage, we only store a reference to the file path so we can wait for user input to permanently save the image at a permanent storage location.
The text was updated successfully, but these errors were encountered:
Platforms
dart, Android, iOS, macOS, Web, Windows, Linux
Description
Return the path to the compressed cache file instead of the Uint8List. At the moment, the compression creates a File in the cache directory and only returns the bytes. There is no way to use the file that has been created in the cache directory by the compression method.
Why
Returning only the bytes of the compressed images forces the user to hold all the bytes in memory or save them as duplicates so we can store a path instead of holding them in memory.
In both scenarios, the file is a duplicate because the compression itself already created a file in the cache folder.
This is important if we compress multiple files. The current workflow:
-> Select Images
-> Compress
-> Wait for the user to confirm compression and save to the device.
These lead to duplicate files and unnecessary storage usage if we don't want to hold the files in memory. To avoid the high memory usage, we only store a reference to the file path so we can wait for user input to permanently save the image at a permanent storage location.
The text was updated successfully, but these errors were encountered: