Image upload from iPhone strips exif data

前端 未结 11 1492
耶瑟儿~
耶瑟儿~ 2020-12-05 04:09

I\'ve built a website which allows image uploading and once an image is uploaded , some specific information about the photo is displayed. Uploading pictures from computers

11条回答
  •  -上瘾入骨i
    2020-12-05 04:58

    There are no official statements from Apple about this feature, although there is a number of people asking about this even on the Apple forums. Actually, from what's reported around the 'net, this not only happens to uploads in Safari from the iPhone, but also for emailed attachments.

    However, it's clear that there are a lot of people affected by this. Flickr seems to be a major victim, but there's others too.

    Luckily, nowadays there are ways of accessing raw file data for tags. This allows you to take the EXIF information you want, put it into a hidden form field, and send it along with the actual file upload. I adapted a jsfiddle from this answer to showcase what I mean by that:

    Have a look.

    UPDATE: JavaScript is of no help

    This seems not to have the desired effect on current-generation iOS devices, as the FileReader API also only gets access to a sanitized version of the file.

提交回复
热议问题