Some fuggin Javascript to capture photo uploads