logoalt Hacker News

embedding-shapetoday at 12:36 PM1 replyview on HN

Couldn't you use <input type="file" accept=".jpg,.jpeg"> (different than image/jpeg mime-type I think, not sure if that also strips EXIF?), then manually parse the EXIF in JS? Shouldn't be that complicated to parse and I'm guessing there is a bunch of libraries for doing just that should you not want to do that yourself.


Replies

embedding-shapetoday at 3:12 PM

I'm not sure why I'm being downvoted for this, so I guess I kind of accidentally nerdsniped myself here...

Anyways, I did this: https://jsbin.com/teriduyexe/edit?html,output

Which correctly seems to show the EXIF for uploaded images (both in Chrome and Firefox), and correctly filters things in the file picker window. What am I missing, why is this infeasible as a solution?

show 1 reply