ushahidi/Ushahidi_Web — pull request #1152 by Brevin (2013-06-26 22:30:50+00:00)
Title: Upload images .jpeg fails - .jpg ok             #1136

Image with .jpeg extensions were not uploaded successfully because the code snippet to get the extension was picking the last four characters of the filename which includes the dot[.] which was being missed for the case of the .jpeg which is five characters plus the dot.

The fix gets the file type using the last appearance of the dot on the filename thus works for all file types.