我用Angular写了一个程序,我用的是exif-js
我在控制台记录createDate,它返回时没有定义。我想让它从存储在jpeg文件中的元数据中提取日期。
我不明白为什么createDate会以未定义的形式返回。
.controller('BeforeCtrl', ['$scope', '$upload', '$http', function($scope, $upload, $http) {
$scope.upload = function (files) {
if (files && files.length) {
for (var i = 0; i < files.length; i++) {
var file = files[i];
EXIF.getData(file, function() {
var createDate = EXIF.getTag(this, "DateTimeOriginal");
console.log(createDate);
});...发布于 2015-03-22 02:22:42
事实证明,我用于测试的图像没有存储在元标记中的日期。
https://stackoverflow.com/questions/29186280
复制相似问题