Adds upload error checking to ensure file is an image.