olofd/react-native-photos-framework

How to create asset of local image ?

kishanbharda opened this issue · 1 comments

Hiii,

I want to create an asset of local image which is in my project directory.

Here is my directory structure :
Screen Shot 2019-04-23 at 6 50 35 PM

I want to create asset of that logo.png.

However I write some code as following :

RCTCameraRollRNPhotosFrameworkManager.createAssets({
        images : [require('../assets/logo.png')],
        album : album,
        includeMetadata : true 
}).then((result)=>{
        alert(JSON.stringify(result));
}).catch((error)=>{
        alert("Error in creating assets.\n"+JSON.stringify(error));
});

But that creating issue for me. I explained issue here

Please tell me how can I solve this issue.

I have solved.
Here is the solution.