fix: send the whole txt submission to te DraftParser (#5956)

This commit is contained in:
Robert Sparks 2023-07-12 08:58:08 -05:00 committed by GitHub
parent 8267f4b452
commit 3fe1fcf122
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -646,6 +646,7 @@ class SubmissionManualUploadForm(SubmissionBaseUploadForm):
def clean_txt(self):
txt_file = self._clean_file("txt", PlainParser)
if txt_file is not None:
txt_file.seek(0)
bytes = txt_file.read()
try:
text = bytes.decode(self.file_info["txt"].charset)