comparison core/image_uploader.py @ 738:df2799f725d8

For #60, fix last commit (775e7f7) which produced UnicodeDecodeErrors.
author Brian Neal <bgneal@gmail.com>
date Fri, 13 Dec 2013 21:00:24 -0600
parents 775e7f74096a
children 234726f5a47a
comparison
equal deleted inserted replaced
737:775e7f74096a 738:df2799f725d8
42 42
43 A tuple is returned: (image_url, thumb_url) where thumb_url will be None if 43 A tuple is returned: (image_url, thumb_url) where thumb_url will be None if
44 a thumbnail was not requested. 44 a thumbnail was not requested.
45 """ 45 """
46 46
47 filename = fp.name.encode('utf-8') 47 filename = fp.name
48 logger.info('Processing image file: %s', filename) 48 logger.info('Processing image file: %s', filename)
49 49
50 # Trying to use PIL (or Pillow) on a Django UploadedFile is often 50 # Trying to use PIL (or Pillow) on a Django UploadedFile is often
51 # problematic because the file is often an in-memory file if it is under 51 # problematic because the file is often an in-memory file if it is under
52 # a certain size. This complicates matters and many of the operations we try 52 # a certain size. This complicates matters and many of the operations we try