react-native-fs icon indicating copy to clipboard operation
react-native-fs copied to clipboard

"Read" problem for overly large files

Open fwestling-lor opened this issue 4 years ago • 2 comments

I have an app performing uploads of large files, using "read" to extract Base64 chunks and upload them; today found an issue with my uploads freezing beyond a certain point, and it's due to the "position" being larger than int_max, so when cast to (int) seek file to offset fails. Pretty simple fix (on iOS at least) - instead of casting the variables to integers, they should be cast to longs, which works for NSIntegers. Still working on Android, but will post a pull request (at least for "read") when that's working

fwestling-lor avatar Jul 23 '21 07:07 fwestling-lor

hey!! @fwestling-lor Thanks a lot.. this pr saved the day.........

sam-uraii avatar Sep 23 '22 13:09 sam-uraii

change RNFSManager.m line 326 [file seekToFileOffset: (unsigned long long)position]; use unsigned long long replace int

lucky-009 avatar Jan 06 '25 08:01 lucky-009