document-picker
document-picker copied to clipboard
'fileCopyUri' is error when picker the same attachment multiple times
Bug report
fileCopyUri is error when picker the same attachment multiple times
Summary
In the demo of the project, select a single file, it will show the results. Then repeat selecting the same attachment about 25 times, fileCopyUri in result will not follow copyTo and there is no file in this path.
Reproducible sample code
const pickerResult = await DocumentPicker.pickSingle({
presentationStyle: 'fullScreen',
copyTo: 'cachesDirectory',
})
console.log(pickerResult)
Steps to reproduce
- Select a file, View the printed results.
- Check if the file exists when
fileCopyUrihas changed significantly.
Describe what you expected to happen:
fileCopyUrishould follow thecopyToin options.- The file in
fileCopyUrishould exists.
Environment info
npx react-native info output:
System:
OS: macOS 12.6
CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
Memory: 1.55 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 18.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
library version: 8.1.1
iOS / Android version: IOS 15.5 (Both simulators and real device can reproduce)