I use mongodb and save the file in gridfs
now i want to edit images from gridfs ...
I am using this code
def thumbnail(file_obj): import StringIO from PIL import Image im = StringIO.StringIO() im.write(file_obj.raw_file) im_ful = Image.open(im) return im_ful.info
but pil said "it is impossible to determine the image file"
this is also an image;) how to fix it?
source share