Only allowing images to be uploaded and returning an error message if a non-image is uploaded.