olofd / react-native-photos-framework

A modern and comprehensive CameraRoll/iCloud-library-API for React Native 📸 📹
MIT License
220 stars 99 forks source link

How to get MimeType? #89

Open ridsameer opened 6 years ago

ridsameer commented 6 years ago

I tried using this library today however the asset does not return the MimeType. And neither is it in the extension. I need the mimeType to upload it without using the in-built ajaxHelper.

FrikkieSnyman commented 6 years ago

@Ridwansameer Check the resourcesMetadata array that is returned with the asset. Make sure that you have includeResourcesMetadata: true in the getAssets props param, ie:

RNPhotosFramework.getAssets({
    ...
    includeResourcesMetadata: true,
    ...
});
ridsameer commented 6 years ago

@FrikkieSnyman I tried it with the metaData, however it does not come with it.