0

Is there a way to retrieve the files author when a file is loaded into a file input?

I'm trying to read an images metadata through jQuery. Right now I can only read date modified, type, and filename. Here is my code:

$('input[type=file]').on('change drop', function (e) {
        for(var i = 0; i<$('input[type=file]').get(0).files.length; i++){
            var files = $('input[type=file]').get(0).files[i];

            uploadedfilename = files.name;
            console.log(uploadedfilename);
            var extension = uploadedfilename.split('.').pop();
            extension = extension.toLowerCase();

            if (extension == "png" || extension == "jpg" || extension == "jpeg" || extension == "bmp" || extension == "gif") {
                $('#drop p').append('Successfully imported ' + uploadedfilename +"<br/>");
                var ff = new Image();
                ff.src = URL.createObjectURL(files);
                imagearray[count] = files;
                count++;
                $('.preview').append('<img src="' + ff.src + '" width=\"10\""/>');
            }
        }
        console.log(imagearray[0]);
    });
pedrum golriz
  • 513
  • 8
  • 27
  • @JayBlanchard not really, that's for exif data. If I right click a jpg in explorer, I can see the authors name, date taken, copyright, etc.. That's the info I'm looking for to import. – pedrum golriz May 16 '14 at 14:10
  • @pedrumgolriz The data you speak of comes from the EXIF tags. Your question is indeed a duplicate. – Ray Nicholus May 16 '14 at 14:22
  • Exif data does NOT include author or copyright information, it strictly contains data about the camera and how the photo was taken. Many images do not come from a camera so will not contain Exif. http://en.wikipedia.org/wiki/Exchangeable_image_file_format#Example – pedrum golriz May 16 '14 at 14:25
  • 1
    @pedrumgolriz where is this data, like author, stored? – Jay Blanchard May 16 '14 at 15:23
  • Sorry @pedrumgolriz but you are mistaken about EXIF data. The article you have cited is an incomplete reference. A more complete reference can be found [here](http://www.media.mit.edu/pia/Research/deepview/exif.html), or in the TIFF spec [here](http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf). An image doesn't have to come from a camera to contain EXIF data. There is no standard for storing metadata in an image outside of EXIF/TIFF, XMP, and IPTC. The first can be easily handled by existing libraries client side. I'm not sure if there are libraries that handle these others. – Ray Nicholus May 16 '14 at 19:10

0 Answers0