def clean_file(self): return validate_mime( self.cleaned_data['file'], ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/octet-stream', 'application/zip', 'application/vnd.ms-excel'], 'Please upload a valid XLSX file' )
def clean_course_assessment(self): return validate_mime( self.cleaned_data['course_assessment'], ['application/pdf'], _('Please upload a valid PDF') )
def clean_enrollment_certificate(self): return validate_mime( self.cleaned_data['enrollment_certificate'], ['application/pdf'], _('Please upload a valid PDF file') )
def clean_cv(self): return validate_mime( self.cleaned_data['cv'], ['application/pdf'], _('Please upload a valid PDF file') )
def clean_profile_image(self): return validate_mime( self.cleaned_data['profile_image'], ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'], _('Please upload a valid JPG, PNG or GIF profile image') )