Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'fileCopyUri' is error when picker the same attachment multiple times #591

Closed
Always-Near opened this issue Sep 22, 2022 · 0 comments · Fixed by #653
Closed

'fileCopyUri' is error when picker the same attachment multiple times #591

Always-Near opened this issue Sep 22, 2022 · 0 comments · Fixed by #653

Comments

@Always-Near
Copy link

Always-Near commented Sep 22, 2022

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.

video

Reproducible sample code

const pickerResult = await DocumentPicker.pickSingle({
  presentationStyle: 'fullScreen',
  copyTo: 'cachesDirectory',
})
console.log(pickerResult)

Steps to reproduce

  1. Select a file, View the printed results.
  2. Check if the file exists when fileCopyUri has changed significantly.

Describe what you expected to happen:

  1. fileCopyUri should follow the copyTo in options.
  2. The file in fileCopyUri should 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant