added python image upload support (sort of)