dynamic base64 mime type when returning image

This commit is contained in:
Ivan Pusic 2016-08-05 20:43:33 +02:00
parent 77f71bcdad
commit e53cad9eaa

View File

@ -39,7 +39,7 @@ export default class App extends Component {
}).then(image => {
console.log('received image', image);
this.setState({
image: {uri: 'data:image/png;base64,'+ image.data, width: image.width, height: image.height},
image: {uri: `data:${image.mime};base64,`+ image.data, width: image.width, height: image.height},
images: null
});
}).catch(e => {});