Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-actual-path

A utility package to resolve real file paths from content:// URIs on Android in React Native.

This package is designed to help developers convert content:// URIs, commonly used by Android content providers, into actual file system paths. It's particularly useful for accessing files in the device's storage from React Native apps.

Installation

You can install the package using either npm or yarn:

npm install react-native-actual-path
# or
yarn add react-native-actual-path

Key Features:

  • 🌐 Android Only
  • Lightweight Library
  • 🚀 Supports New Architectures (Turbo Modules)

Example:

import { getRealPath } from 'react-native-real-path';
import { pickSingle } from 'react-native-document-picker';

const result = await pickSingle();
const realPath = getRealPath(result.uri);

console.log(realPath); // Output: actual file system path or original URI

getRealPath(path: string): string

  • Input: A string representing a file path or URI.
  • Output: A string representing the real file system path if the input is a content:// URI, or the original path if not.

About

Lightweight React Native utility (Turbo Module) that resolves real file system paths from Android content:// URIs. Convert content provider URIs to actual file paths for access, uploads and processing. New architecture support.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages