fix: read file failed on android 10 and above without requestLegacyExternalStorage #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to Api 29+ Behavior changes, The scoped storage should fixed.
The pull request aims to fix read file failed without announces
android:requestLegacyExternalStorage
flag.When Api level gte 29. The behavior fallback to copy file to temp dir and return temp file back.
References:
https://github.com/ivpusic/react-native-image-crop-picker/blob/798ac61cf94c393bea833f1b583bbfba7a09c6ea/android/src/main/java/com/reactnative/ivpusic/imagepicker/RealPathUtil.java#L138
https://github.com/hiddentao/cordova-plugin-filepath/blob/7b8847e0b182c2a1f427a31f3b04f40e11842144/src/android/FilePath.java#L420
Related: apache#585, apache#573, apache#531, apache#548, apache#554, apache#558, apache#563