Pure Javascript Photo Uploader