1var request = require('request').defaults({ encoding: null });
2request.get(s3Url, function (err, res, body) {
3 //process exif here
4});
1function toBase64(arr) {
2 //arr = new Uint8Array(arr) if it's an ArrayBuffer
3 return btoa(
4 arr.reduce((data, byte) => data + String.fromCharCode(byte), '')
5 );
6}
7
8$('#two').prepend($('<img>',{id:'theImg2',src:`data:image/png;base64,${toBase64( selected[0].image2.data)}`}))
9
10