error handler for uploading invalid image file type