Block function for uploading party models, some validation and error handling also added