diff --git a/submissions/forms.py b/submissions/forms.py index 32c8207409087a1235d003d1828fab7f7b00bd90..37edb45510b24d32f8aa68cb37867434834f1059 100644 --- a/submissions/forms.py +++ b/submissions/forms.py @@ -672,7 +672,7 @@ class iThenticateReportForm(forms.ModelForm): ' Please upload the pdf manually.')) self.fields['file'] = forms.FileField() elif not doc_id and cleaned_data.get('file'): - cleaned_data['document'] = cleaned_data['file'] + cleaned_data['document'] = cleaned_data['file'].read() elif doc_id: self.document_id = doc_id @@ -743,7 +743,7 @@ class iThenticateReportForm(forms.ModelForm): # Finally, upload the file author = self.submission.authors.first() response = client.documents.add( - self.document.read(), + self.document, folder_id, author.user.first_name, author.user.last_name,