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
Hey, @Dverlik! What you're trying to do, i. e. read/write a binary file through FileSystem API, is unfortunately unsupported in SDK 30.
When you try to read a binary file to a string, it isn't really possible to represent bytes without any special encoding. That's why @EvanBacon added Base64 encoding support to FileSystem which will fix the scenario you've described. 🎉
Environment
Environment:
OS: macOS High Sierra 10.13.6
Node: 10.7.0
Yarn: 1.10.1
npm: 6.1.0
Watchman: 4.9.0
Xcode: Xcode 10.0 Build version 10A255
Android Studio: 3.2 AI-181.5540.7.32.5014246
Packages: (wanted => installed)
expo: ^30.0.1 => 30.0.1
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4
Target: Android 7.0 NRD90M
Steps to Reproduce
FileSystem.readAsStringAsync
the photo fileFileSystem.writeAsStringAsync
the contents to another file without modificationsMediaLibrary.createAssetAsync
from the original fileMediaLibrary.createAssetAsync
from the second fileExpected Behavior
The files should be identical.
Actual Behavior
The first (original) file is a readable photo. The second is 12KBs of malformed data, containing:
EFBFBDEF BFBDEFBF BDEFBFBD
Reproducible Demo
The text was updated successfully, but these errors were encountered: