def clean(self):
        """Limit the length of the filename."""
        attachment = self.cleaned_data.get('attachment')
        # Limits filename to 200 characters to leave room for upload_path.
        if attachment and len(attachment.name) > 200:
            self._errors['attachment'] = self.error_class([
                'Filename cannot exceed 200 characters.'])
        return self.cleaned_data
dataset/ETHPy150Open ofa/connect/open_connect/resources/forms.py/ResourceForm.clean/original