summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scipy/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scipy/views.py b/scipy/views.py
index b6d9d8c..c48dc11 100644
--- a/scipy/views.py
+++ b/scipy/views.py
@@ -89,7 +89,7 @@ def upload_document(request):
if request.method == 'POST':
form = DocumentUploadForm(request.POST, request.FILES)
attachment = request.FILES['attachments']
- content_type = attachment.split('/')[1]
+ content_type = attachment.content_type.split('/')[1]
content_size = attachment.size
if not content_type in allowed_files:
invalid_file_msg = "Only PDF, DOC, DOCX & TXT files are allowed"