Is there a way to get the original name of a image file using the Expo Image Picker?

Viewed 1055

I'm using the Image Picker in a react-native project and I need to show the original name of the image file on the screen... I've read the documentation and I found nothing about that, can someone help me with that?

P.S: I'm using the latest version of React and Expo Image Picker.

Thank you!

1 Answers

Expo Image Picker clone the original file to the cache directory for your app and file loose original file metadata include the file name. The existing APIs do not provide the original file metadata.

To access extra file metadata include filename, size, modified time you can use https://www.npmjs.com/package/expo-cameraroll

It should be achieved by expo-media-library but above package provides more abstractions and is easy to use.

Related