【发布时间】:2020-02-25 08:27:32
【问题描述】:
我想知道,是否可以使用 ng-file-upload 库读取附加到图像文件的 Exif 元数据以读取地理位置。
有一些选项(例如 ngf-fix-orientation)可以利用 Exif 对象的元数据。但是,选择文件后,它不再包含任何exif信息。
我试过了:
ngf-before-model-change="beforeChange($files)"
与:
$scope.beforeChange = function(files){ console.log('BeforeChangefiles', files); };
结果如下:
0: File name: "IMG_5277.JPG" lastModified: 1559123113000 lastModifiedDate: Wed May 29 2019 11:45:13 GMT+0200 (Mitteleuropäische Sommerzeit) {} webkitRelativePath: "" size: 3741545 type: "image/jpeg" $ngfBlobUrl: "blob:http://localhost/630d0c34-07a1-4f41-81fd-e2cf021cbf65" $ngfWidth: 4032 $ngfHeight: 3024
Exif 信息此时似乎已经丢失。
是否有可能在 exif 信息丢失之前访问它?
如果没有,推荐哪些解决方法?
【问题讨论】:
标签: angularjs geolocation exif ng-file-upload