added some super simple validation to only allow jpegs and pngs to be uploaded