Created
December 15, 2017 00:11
-
-
Save renso3x/dd7e00c8c91dfb9352e6c980b26e2d0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// images are from the properties.. | |
downloadImages = async ({ images }) => { | |
const newImage = images.map(image => { | |
return RNFetchBlob.fetch('GET', image.url) | |
.then(res => { | |
return { | |
title_en: image.title_en, | |
type: image.type, | |
image: `data:image/png;base64,${res.base64()}`, | |
}; | |
}); | |
}); | |
return Promise.all(newImage).then(resp => resp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment