asaglimbeni / clean-image-crop-uploader

Clean Image Crop Uploader (CICU) provides AJAX file upload and image CROP functionalities for ImageFields with a simple widget replacement in the form. It use Modal from twitter-bootstrap.
http://asaglimbeni.github.com/clean-image-crop-uploader/
Other
40 stars 36 forks source link

crop view doesn't work on Windows #3

Closed kkarwows closed 11 years ago

kkarwows commented 11 years ago

Crop view from clean-image-crop-uploader / cicu / views.py doesn't work on Windows. Problem is in line:

f = open(pathToFile, mode='r')

According to http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files it should be:

f = open(pathToFile, mode='rb')

It's safe both for Unix and Windows.

asaglimbeni commented 11 years ago

Hi Kkarwows, yes it's right! It prefers to use 'rb' mode. Thank you for your contribution! Alfredo