React Native’s new native pickers make it possible to give users a great file-selection experience without scaring them off with permission prompts. I pulled those capabilities into a single package—react-native-files-picker—and wanted to share how it works, what it covers, and how you can drop it into your own app.
What problem does this solve?
Most file pickers still lean on legacy storage APIs. That means extra permissions, more boilerplate, and tricky compatibility work. react-native-files-picker wraps the latest native pickers and falls back gracefully on older devices so you can:
- Skip permission dialogs entirely on Android 13+ and iOS 14+
- Offer a single API for images, video, audio, and documents
- Ship type-safe code with metadata, caching, and optional processin…
React Native’s new native pickers make it possible to give users a great file-selection experience without scaring them off with permission prompts. I pulled those capabilities into a single package—react-native-files-picker—and wanted to share how it works, what it covers, and how you can drop it into your own app.
What problem does this solve?
Most file pickers still lean on legacy storage APIs. That means extra permissions, more boilerplate, and tricky compatibility work. react-native-files-picker wraps the latest native pickers and falls back gracefully on older devices so you can:
- Skip permission dialogs entirely on Android 13+ and iOS 14+
- Offer a single API for images, video, audio, and documents
- Ship type-safe code with metadata, caching, and optional processing baked in
Under the hood, it uses Android Photo Picker (API 33+), Storage Access Framework for older Android versions, PHPicker on modern iOS versions, and UIImagePickerController as a fallback.
Installation and setup
If you’re running React Native 0.61 or newer:
bash
npm install react-native-files-picker
# or
yarn add react-native-files-picker
# or
pnpm add react-native-files-picker
**iOS needs the usual CocoaPods step:**
`cd ios && pod install && cd ..`
Expo projects can use the same package. Just remember that you need a custom development build or EAS build—Expo Go doesn’t have the native module bundled:
npx expo install react-native-files-picker
Quick usage
`import { pickMedia, pickFiles } from 'react-native-files-picker';
const photos = await pickMedia('image', {
multiple: true,
copyToCache: true,
stripEXIF: true,
compressImage: { quality: 0.8, maxWidth: 1920, maxHeight: 1920 },
});
const files = await pickFiles('any', {
multiple: true,
copyToCache: true,
});`
Each result includes rich metadata (fileName, fileSize, dimensions, duration, mimeType, timestamps, and more), allowing you to display or upload it immediately without additional lookups.
Backward compatibility
Android ≤12: falls back to the Storage Access Framework automatically.
iOS 14/15: falls back to UIImagePickerController when PHPicker isn’t available.
TypeScript definitions are included, so you get intellisense regardless of version.
Why the zero-permission approach matters
Users are increasingly suspicious of apps that request blanket access to their photos or files. By relying on the system pickers you get privacy wins and better UX, plus you have less platform-specific code to maintain. Because the APIs return scoped URIs, you also cut down on manual cleanup work.
Roadmap and feedback
I’m tracking future enhancements (better media previews, additional metadata, and tighter Expo integration) on GitHub. If you run into edge cases—especially around SAF or older iOS versions—I’d love to hear about them.
npm: https://www.npmjs.com/package/react-native-files-picker
GitHub: https://github.com/khokanuzzman/react-native-files-picker