summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayaram Pai2013-10-23 17:49:23 +0530
committerJayaram Pai2013-10-23 17:49:23 +0530
commitf5cc610288dc4b4fd2e403c849e8a9b2ed7cd72c (patch)
tree64d0221d2509b0b7023f149e107a81b754c97065
parent1bac7666dc06b556971510a9339f069442b3e6c9 (diff)
downloadSciPy2013-f5cc610288dc4b4fd2e403c849e8a9b2ed7cd72c.tar.gz
SciPy2013-f5cc610288dc4b4fd2e403c849e8a9b2ed7cd72c.tar.bz2
SciPy2013-f5cc610288dc4b4fd2e403c849e8a9b2ed7cd72c.zip
content_type.split for attachment
-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"