vinceglb / FileKit

Pick and save Files, Medias and Folder for Kotlin Multiplatform / KMP and Compose Multiplatform / CMP
https://vinceglb.github.io/FileKit/
MIT License
249 stars 8 forks source link

Feature/add getSize function to PlatformFile #39

Closed santiwanti closed 2 weeks ago

santiwanti commented 3 weeks ago

Added fun getSize(): Long? to PlatformFile. This allow accessing the size of a file without having to readBytes first.

vinceglb commented 3 weeks ago

It looks great thank you! I'm going to test it on iOS.

If you tried to use the iOS simulator, with the image picker, and you choose a default image of flowers, it will crash due to an emulator bug: https://stackoverflow.com/a/74760585/7947225

santiwanti commented 3 weeks ago

If you tried to use the iOS simulator, with the image picker, and you choose a default image of flowers, it will crash due to an emulator bug: https://stackoverflow.com/a/74760585/7947225

That was probably it. I will try to see if I can test it with a different image or a downloaded file so I also know for next time. Confirmed that was the issue. Using a downloaded pdf I had no issues