当文件加载到文件输入中时,有没有办法检索文件作者?
我试图通过jQuery读取图像元数据。现在我只能读取修改日期,类型和文件名。这是我的代码:
$('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]);
});