Permalink
Browse files

Updated utils to pull filename out of X-File-Name header

  • Loading branch information...
1 parent 3ce31e1 commit 6335a55c95cd4f27a0ca9c4876ffe0d5af64d1a5 @brettcvz brettcvz committed Jan 12, 2013
Showing with 6 additions and 2 deletions.
  1. +1 −0 MANIFEST
  2. +3 −0 django_filepicker/utils.py
  3. +2 −2 setup.py
View
@@ -6,4 +6,5 @@ django_filepicker/context_processors.py
django_filepicker/forms.py
django_filepicker/middleware.py
django_filepicker/models.py
+django_filepicker/utils.py
django_filepicker/widgets.py
@@ -29,6 +29,9 @@ def get_file(self):
disposition = header.get('Content-Disposition')
if disposition:
name = disposition.rpartition("filename=")[2].strip('" ')
+ filename = header.get('X-File-Name')
+ if filename:
+ name = filename
self.tempfile = open(self.filename, 'r')
return File(self.tempfile, name=name)
View
@@ -1,10 +1,10 @@
from distutils.core import setup
setup(name='django-filepicker',
- version='0.1.2',
+ version='0.1.3',
description='Official Filepicker Django Library',
author='CloudTop, Inc',
author_email='contact@filepicker.io',
url='http://developers.filepicker.io/',
packages=['django_filepicker'],
- install_requires=['django']
+ install_requires=['django >= 1.3']
)

0 comments on commit 6335a55

Please sign in to comment.