使用node.js中的exif和promises列出来自aws s3的图像

时间:2017-12-04 17:57:25

标签: node.js promise aws-sdk exif

我正在使用aws-sdk和exif库从s3存储桶中的图像中获取图像细节。

我已经习惯在node.js中获取我的存储桶ss图像的exif图像细节。对于那个使用aws-sdk和exif库来获取 我的aws桶的所有数据,但我没有得到该代码的结果。
我使用了以下代码:

<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8' />
    <title>Draw GeoJSON points</title>
    <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
    <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.42.2/mapbox-gl.js'></script>
    <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.42.2/mapbox-gl.css' rel='stylesheet' />
    <style>
        body { margin:0; padding:0; }
        #map { position:absolute; top:0; bottom:0; width:100%; }
    </style>
</head>
<body>

<div id='map'></div>
<script>

var longLat = [
 [53.515333, -6.190796],
 [53.342686, -6.403656],
 [51.678091, -9.624023],
 [52.768293, -1.560059]
 ];

mapboxgl.accessToken = 'undefined';
var map = new mapboxgl.Map({
    container: 'map',
    style: 'mapbox://styles/mapbox/light-v9',
    center: [-96, 37.8],
    zoom: 3
});

map.on('load', function () {

    map.addLayer({
        "id": "points",
        "type": "symbol",
        "source": {
            "type": "geojson",
            "data": {
                "type": "FeatureCollection",
                "features": [{
                    "type": "Feature",
                    "geometry": {
                        "type": "Point",
                        "coordinates": [-77.03238901390978, 38.913188059745586]
                    },
                    "properties": {
                        "title": "Mapbox DC",
                        "icon": "monument"
                    }
                }, {
                    "type": "Feature",
                    "geometry": {
                        "type": "Point",
                        "coordinates": [-122.414, 37.776]
                    },
                    "properties": {
                        "title": "Mapbox SF",
                        "icon": "harbor"
                    }
                }]
            }
        },
        "layout": {
            "icon-image": "{icon}-15",
            "text-field": "{title}",
            "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
            "text-offset": [0, 0.6],
            "text-anchor": "top"
        }
    });
});
</script>

</body>
</html>

但是浏览器中的响应为空。 如何找到此代码的详细信息:

1 个答案:

答案 0 :(得分:0)

我在github问题中找到了解决方案....这是解决方案 https://github.com/nathan818fr/async-loop/issues/2