We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b52919 commit c4bb283Copy full SHA for c4bb283
1 file changed
ietf/meeting/forms.py
@@ -329,9 +329,11 @@ def clean_file(self):
329
file = self.cleaned_data['file']
330
validate_file_size(file)
331
ext = validate_file_extension(file, self.extensions)
332
- mime_type = None
+ mime_type, encoding = validate_mime_type(file, self.mime_types)
333
+ if not hasattr(self, 'file_encoding'):
334
+ self.file_encoding = {}
335
+ self.file_encoding[file.name] = encoding.replace('charset=','') if encoding else None
336
if self.mime_types:
- mime_type, encoding = validate_mime_type(file, self.mime_types)
337
if mime_type != file.content_type:
338
raise ValidationError('Upload Content-Type (%s) is different from the observed mime-type (%s)' % (file.content_type, mime_type))
339
if mime_type in settings.MEETING_VALID_MIME_TYPE_EXTENSIONS:
0 commit comments