Page MenuHomePhabricator

Upload API doesn't return metadata for some images
Open, LowPublic

Description

Author: neilk

Description:
iPhone created image with GPS tags, doesn't seem to work

Somewhere in this chain:

  • uploading image to stash
  • using stashimageinfo API request
  • parsing Exif
  • returning information

I am not getting GPS data for some images from my iPhone that I know have GPS data. See attached.

A hex dump of an EXIF-parsing tool (exiv2) shows that the images have comparable data -- in fact the iPhone one has more, including a GPS Timestamp and Altitude.


Version: 1.18.x
Severity: normal

Attached:

IMG_1404.JPG (1×2 px, 1 MB)

Details

Reference
bz32192

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:00 AM
bzimport set Reference to bz32192.
bzimport added a subscriber: Unknown Object (MLST).

neilk wrote:

Image from Nikon D300 with GPS tags, seems to work

Attached:

Northbrae_Tunnel-med.jpg (495×640 px, 91 KB)

neilk wrote:

dump from exiv2 for two different images, grepped for GPS data

Attached:

Hmm, uploading the iPhone image onto my local trunk wiki, I see in the exif table on the file page:

Latitude 36° 47′ 35.4″ N
Longitude 3° 53′ 50.4″ W
Altitude 317.396 meters above sea level

neilk wrote:

(In reply to comment #3)

Hmm, uploading the iPhone image onto my local trunk wiki, I see in the exif
table on the file page:

Latitude 36° 47′ 35.4″ N
Longitude 3° 53′ 50.4″ W
Altitude 317.396 meters above sea level

Same here. Strange.

neilk wrote:

Perhaps this bug is mistitled, The real difference is that for one, we get metadata = null in the API request, and for the other we get full metadata. So possibly something else is blowing up when it tries to get metadata.

The api returns data for me on a direct upload (haven't tried testing anything fancy with stash uploading).

Got a script or procedure to repro the upload stash API sequence?

It looks like stashed files will get their metadata & whatnot read fresh from the original file when ApiQueryStashImageInfo gets called; as long as it's able to detect the file type correctly this _should_ go through the same old code paths in File::getPropsFromPath(), as they do on upload saving proper.

If the stashed file path includes an extension, I think this shouldn't be a problem...