Skip to content

Linking.openURL to open Explorer #12252

Answered by chrisglein
WilliamWelsh asked this question in Q&A
Discussion options

You must be logged in to vote

file:// isn't called out as on the of the expected protocols from RN core: https://reactnative.dev/docs/0.71/linking#built-in-url-schemes
Internally for RNW we forward that to LaunchUriAsync. Which has more options... but local files aren't one of them:

You cannot use this method to launch a URI in the local zone. For example, apps cannot use the file:/// protocol to access files on the local computer. Instead, you must use the Storage APIs to access files.

It'd take more work to make RNW's implementation of Linking both smarter than RN core and smarter than UWP. But it also seems kind of reasonable. Can you open a feature request on the repo for us to evaluate?

In the meantime you'd ne…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chrisglein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants