Skip to content

Instantly share code, notes, and snippets.

@renso3x
Created December 15, 2017 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renso3x/dd7e00c8c91dfb9352e6c980b26e2d0a to your computer and use it in GitHub Desktop.
Save renso3x/dd7e00c8c91dfb9352e6c980b26e2d0a to your computer and use it in GitHub Desktop.
// 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