
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-file-panel
Advanced tools
A native module which implements file picker panel for React Native for Windows/macOS
yarn add react-native-file-panel
If you are using this library for macOS, you have to run USE_HERMES=1 RCT_NEW_ARCH_ENABLED=1 bundle exec pod install at {your-project}/macos/ folder before build your app.
Your React Native app must be New Architecture app.
To make a new arch React Native app. follow here for Windows, and here for macOS.
If you are using this library for macOS, you have to modify {your-project}/macos/Podfile to platform :macos, '11.0'(or over 11.0) and :hermes_enabled => true.
ext(File extensions) must include .(dot)
openFile(ext?: string|string[]): Promise<string>Opens a file picker panel which allows only to pick one file and open it.
If file has picked, it will return the path of the file. Breaking change at 1.1.0
Sample code:
import { JSX } from 'react';
import { Button, View } from 'react-native';
import { openFile } from 'react-native-file-panel';
export default function App(): JSX.Element {
return (
<View>
<Button title='TestAny' onPress={ async () => console.log(await openFile()) } />
<Button title='TestTxt' onPress={ async () => console.log(await openFile('.txt')) } />
<Button title='TestMulti' onPress={ async () => console.log(await openFile(['.txt', '.md'])) } />
</View>
);
}
openFiles(ext?: string|string[]): Promise<string[]>Opens a file picker panel which allows to pick more than one file and open it.
Same as openFile, but returns an array of paths. Breaking change at 1.1.0
Sample code:
import { JSX } from 'react';
import { Button, View } from 'react-native';
import { openFiles } from 'react-native-file-panel';
export default function App(): JSX.Element {
return (
<View>
<Button title='TestAny' onPress={ async () => console.log(await openFiles()) } />
<Button title='TestTxts' onPress={ async () => console.log(await openFiles('.txt')) } />
<Button title='TestMulti' onPress={ async () => console.log(await openFiles(['.txt', '.md'])) } />
</View>
);
}
openFolder(): Promise<string[]>Opens a folder picker panel which allows to pick a folder and open it.
If folder has picked, returns absolute path of the folder.
Sample code:
import { JSX } from 'react';
import { Button, View } from 'react-native';
import { openFolder } from 'react-native-file-panel';
export default function App(): JSX.Element {
return (
<View>
<Button title='TestFolder' onPress={ async () => console.log(await openFolder()) } />
</View>
);
}
saveFile(ext: string|string[], content: string): Promise<void>Opens a file picker panel which allows to pick/make a file and save contents to it. returns path of saved file. Breaking change at 1.2.0
content must be base64-encoded string.
Least one file extension required.
Sample code:
import { JSX } from 'react';
import { Button, View } from 'react-native';
import { saveFile } from 'react-native-file-panel';
export default function App(): JSX.Element {
return (
<View>
<Button title='TestSave' onPress={ async () => console.log(await saveFile('.txt', 'VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4=')) } />
</View>
);
}
FAQs
File picker panel module for React Native Windows/macOS
We found that react-native-file-panel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.