-
Notifications
You must be signed in to change notification settings - Fork 374
Open
Labels
Automation: triageTriaged automatically by our bot.Triaged automatically by our bot.Platform: iOSSort: Enhancementawait triage
Description
Platforms
iOS
Description
I need to access the size of a file that is on iCloud. I don't need the actual file, just the size in bytes. Right now in my app i do something this:
Future<int> getSize() async {
File? file = await _ae.originFile;
if (file == null) return 0;
return file.lengthSync();
}
Where _ae is the AssetEntity.
On iOS this download the originFile into the cache folder of my app and by doing that with multiple large assets my app becomes very large very quick. Even if I built a system to clear the cache automatically when the file is not longer needed, is still something that I would like to avoid.
Why
I would like a way to obtain the size in bytes of an asset without downloading the file. For example, AssetEntity could expose a size property or a method that does not trigger a full download.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Automation: triageTriaged automatically by our bot.Triaged automatically by our bot.Platform: iOSSort: Enhancementawait triage