【问题标题】:Exif-js command not working in Angular controllerExif-js 命令在 Angular 控制器中不起作用
【发布时间】:2015-05-25 00:40:36
【问题描述】:

我用 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);
              });...

【问题讨论】:

    标签: angularjs exif exif-js


    【解决方案1】:

    原来我用于测试的图像没有存储在元标记中的日期。

    【讨论】:

      猜你喜欢
      • 2016-03-11
      • 2018-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-19
      • 2017-05-02
      相关资源
      最近更新 更多