I\'m sending images as base64 string through ajax to django. In my django view I need to resize the image and save it in the file system.
Here is a base64 string(si
SOLUTION:
Saving the opened PIL image to a file-like object solves the issue.
pic = cStringIO.StringIO()
image_string = cStringIO.StringIO(base64.b64decode(request.POST['file']))
image = Image.open(image_string)
image.save(pic, image.format, quality = 100)
pic.seek(0)
return HttpResponse(pic, content_type='image/jpeg')